This is because (max - min) can be very huge(as large as 1e9).
You cannot allocate such a large sized array(forget about accessing elements).
Try to think of a different approach to this problem.
This is because (max - min) can be very huge(as large as 1e9).
You cannot allocate such a large sized array(forget about accessing elements).
Try to think of a different approach to this problem.