Removing Duplicates in an array in C
Posted
by LuckySlevin
on Stack Overflow
See other posts from Stack Overflow
or by LuckySlevin
Published on 2010-05-13T11:04:54Z
Indexed on
2010/05/13
11:14 UTC
Read the original article
Hit count: 219
The question is a little complex. The problem here is to get rid of duplicates and save the unique elements of array into another array with their original sequence.
For example :
If the input is entered b a c a d t
The result should be : b a c d t in the exact state that the input entered.
So, for sorting the array then checking couldn't work since I lost the original sequence. I was advised to use array of indices but I don't know how to do. So what is your advise to do that?
© Stack Overflow or respective owner