4
1
Question
A basket is full n colored balls . Except one ball all the other colors are repeating. Find the one color that does not repeat,in O(n) space complexity.
What if each ball is repeated exactly twice?
you can consider it to be an array or a list or any container with a capacity of 100
6Unless you specify some kind of input and output format (or the flexibility of what you allow) people are going to make vastly different assumptions. – Peter Taylor – 2012-07-09T18:24:38.717
2This question isn't suited for CodeGolf. You need to specify a winning criteria. Otherwise, try StackOverflow.com if you are needing help. – MrZander – 2012-07-09T21:15:37.547
Do you want us to find the duplicate balls as the title suggests? – Prince John Wesley – 2012-07-10T15:00:58.787
@PrinceJohnWesley Yes thats the whole idea!! – samairtimer – 2012-07-10T15:36:05.800
-1 no input format specified, no output format specified... How you output the repeated ball? Index? Is it one indexed or zero indexed? – Rohan Jhunjhunwala – 2016-07-08T22:31:32.787