Google interview question

Related to linked list and array list.