CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 16

Threaded View

  1. #10
    Join Date
    May 2009
    Posts
    2,413

    Re: Array Duplicates

    Quote Originally Posted by viperlasson View Post
    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
  •  





Click Here to Expand Forum to Full Width

Featured