Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sameera_sy
· 9y ago · 0 comments
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!
Comments
[–]
haidrali
9y 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