Popular Posts

Saturday, March 19, 2011

Program to Find One Elements Which Occurs Only Once Except it All Occurs Thrice


You are given an array that contains integers. The integers content is such that every integer occurs 3 times in that array leaving one integer that appears only once.

Fastest way to find that single integer
eg:
Input: [2,1,4,5,1,4,2,2,4,1]
Answer: 5



http://shashank7s.blogspot.com/2011/03/wap-for-find-one-elements-which-occurs.html

No comments:

Post a Comment