@startuml title Step 0 — Initial State object "Node 1" as n1 { value = 1 } object "Node 2" as n2 { value = 2 } object "Node 3" as n3 { value = 3 } n1 --> n2 : next n2 --> n3 : next n3 --> "null" : next object "previous" as prev object "current" as cur prev --> "null" cur --> n1 note bottom Before the loop starts: previous = null current = head The original list is still intact. end note @enduml