LeetCode: https://leetcode.com/problems/reverse-linked-list/
Given the head of a singly linked list, reverse the list, and return the reversed list.
cur
1
0
2
1
3
2
4
3
5
4
prevIdx=null
reversed=[]
remaining=[1, 2, 3, 4, 5]
Step 1 / 6
Step 1:
Initialize prev=nil, cur=head. No links reversed yet.
Pointers: cur=0
Focus: select @ [0]