Problem: 203. Remove Linked List Elements
Time: 10min
Method: Dummy head
Reflection: When a node is deleted, current cursor should not move to the next node because the cur.next.val has not been checked yet.
Time complexity: O(N)
Space complexity: O(1)
Problem: 206. Reverse Linked List
Time: 10min
Method: two pointers + temp
Reflection: Need temp variable to save the address of cur.next after the direction reversed. The while condition should be while cur, so the cur can point to None and pre can point to the last node.
Time complexity: O(N)
Space complexity: O(1)