Linked Lists Checkpoint

Work fresh traces, diagnose invalid implementations, and identify model boundaries.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Reverse 1→2→3→nil. What value becomes the head?
2. During reversal, code changes cur.Next before preserving the old next pointer. What is the risk?

Select one answer.

3. A capacity-2 LRU receives put(A), put(B), get(A), put(C). Which key is evicted?

Select one answer.

4. A linked list has a tail that points back to its head. How many nil next pointers exist on that cycle?
5. Two sorted input lists share an existing node. Why should an in-place merge contract mention input disjointness?

Select one answer.

Join Discord