4 ms·
@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
by 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