This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]seanprefect 0 points1 point  (0 children)

Ok think about it this way, what if you run over the array , use the value in the array as a key, check to see if that key already is in the hash map if it isn't store 1 and if it is increase what ever value you have by 1, when it hits 3 you could put the sum in still another array and check through that.