Hi Friends..im new to this site and i need help.

I need source code for removing duplicate values from an array of integers.
please help me as soon as you can..Thanks a lot!!

Here's the code:

Oh wait, I don't take orders from you.

See, if you would have at least showed a little effort and proved you at least know something about what you're doing, then I would help. But I don't take orders from you.

It's simple, I'll give you a hint.

e.g

1,6,3,7,7,2,4,20,1

First, sort your array into ascending order.

1,1,2,3,4,6,7,7,20

Then have a nested for loop and loop through the sorted array.
If the next element is the same as the first delete it. Keep doing the same until you encounter a different number. Repeat until finished. :lol:

hell, no. That's far too complicated...
You can skip the sorting, and do a rather simple check on duplicates on filling the return array.

>You can skip the sorting, and do a rather simple check on duplicates on filling the return array.

Please shoe me. I can't see it. :sad:

hey Server Crash..i wasn't giving any orders to anyone..i just asked for help..i am new to Java and i don't know much about C++ as well...so just thought i would find some kind people here to help me..
anyways thanx a lot for the answer..

Thanx a lot friends (Who atleast Thought it would be worth helping me) i'll try the program on my own now..coz i wasn't getting a road to start with..now i think i can write the program myself and will post it here as soon as i can..
Thanks a lot for showing copncern and finding out time for me!!!

Thanx a lot friends (Who atleast Thought it would be worth helping me) i'll try the program on my own now..coz i wasn't getting a road to start with..now i think i can write the program myself and will post it here as soon as i can..
Thanks a lot for showing copncern and finding out time for me!!!

It is ok I am learning too. :cool:

This article has been dead for over six months. Start a new discussion instead.