Saturday, May 22, 2010

Code in c to remove duplicate elements from the soreted array?

1,2,33,4,5,3 ---%26gt; 1,2,4,5

Code in c to remove duplicate elements from the soreted array?
I too want to learn C.......


I'm keeping a watch on this question................
Reply:Have u tried anything so far? And one more thing the example u have shown does not contain duplicate elements (unless there is a typo ofcourse)
Reply:u can delete duplicates during the sorting prozedur.





There are many kind of sorting algorithmen like by bublesorting....and during the compairing in the sorting prozedure if the same value comes u can delete it :


//sample


if(A[i] == A[lauf]){


copy A withot A[i] and let them sort


}


No comments:

Post a Comment