MyArrayList.remove() has been corrected according to the requirements.