EmbLogic's Blog

ARRAY IN C

How to Remove the duplicates in an array.

2 Responses to ARRAY IN C

  1. compare each array index value one by one with whole array, if it found both are similar then delete it or shifts lower index to up side by using loop and inserting statement a[i]==a[i++]

  2. Amit Das says:

    Thanks for comments:
    This is ok for replacing single element duplicates but complexity grows when we have multiple duplicates of different elements on various positions. So I am looking for efficient searching algorithm.

Leave a Reply to Amit Das Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>