top | item 13519310

(no title)

sameera_sy | 9 years ago

I'm surprised how the solution doesn't have the hashmap implementation of it, which gives out o(n) and is much more simple. But the algorithm is interesting though!

discuss

order

haidrali|9 years ago

@sameera_sy thats the point hash map solution will take O(n) space complexity as well consider a situation where you need memory efficient solution