@subharansu When I meant the n/2 space in worst case, assuming u have 1 million total numbers(n), and according to the problem, it can have single non-repitive number. soo.. 999999 entires will comprise of at max 999999/2 values.. assumuing.. none of them repeated more than twice
Actaully.. I was not considering the additional space to store the counts, with out that its n/2 space.. anyway.. if its n/2 or n... its O(n) -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.