reverse_list.cpp
C++ 15.3
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.
+ 7 hidden
head = [3, 6, 9, 12, 15]
[15, 12, 9, 6, 3]
The old tail 15 becomes the new head, and the old head 3 now ends the list.