I have just solved [one problem] given on CodeChef for sorting a list of integer.
Solved using two methods:
Using ArrayList ([solution])
Using Array ([solution])
Now time and memory occupied by above solution is:
Java Arrays are faster then ArrayList and it occupies less memory than ArrayList.
Can anyone tell me why it uses same memory for both solution?