Bloomberg Interview Question

Linked List optimization problem