>_
reverse_list.go
Go 1.26
Not run yet

+ 7 hidden

Input
head = [3, 6, 9, 12, 15]
Expected
[15, 12, 9, 6, 3]

The old tail 15 becomes the new head, and the old head 3 now ends the list.