yes, its because the hashmap would take up space of 10^9 ints in the worst case which is around 4gb of space whereas the memory limit is only 256MB.
yes, its because the hashmap would take up space of 10^9 ints in the worst case which is around 4gb of space whereas the memory limit is only 256MB.