Arista Networks Interview Question

An algorithmic problem with linked lists