J.P. Morgan Interview Question

Linked list and arrays