to approaches ,
i)use counting principle and find out no of times each no occurs
andput only one element in new array.
ii)
sort the array.
use any stable sorting algo.
next use
int a[10];
count=1;
for(int i=0) for all values til l10
{
if(a[i]==a[i+1])
{
a[i]=a[count-1];
count++;
i++;
}
else
i++;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to