Problem 1265 · Medium

Print Immutable Linked List in Reverse

Walk an immutable list forward, stacking each node, then pop the stack so every value prints in reverse.

Open the interactive visualisation