|
-
November 2nd, 2009, 04:31 AM
#10
Re: Array Duplicates
 Originally Posted by viperlasson
Got it working,
Does it really work?
Say you have the same number three times in the array. You find the number and look for duplicates. You'll find two duplicates. But then you'll find the number again and this time it has one duplicate.
So how do you know if a number has already been counted as duplicate?
..X......X..........X........
When you encounter any number, say X, you must first check so there are no X to the left. If there are, the X is already accounted for as duplicate and should be skipped.
Last edited by nuzzle; November 2nd, 2009 at 04:54 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|