Added toReverseArray for LinkedList