3 ms·
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 tho
by sameera_sy 10y 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!
- haidrali 10y 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