1.Why is adding a node at the front of a linked list O(1), while xs.insert(0, x) on a Python list is O(n)?
2.To put a new node after node, which lines keep the rest of the list?
3.Nodes 0 to 7 form a list where node 7 points back at node 3. Floyd's slow and fast pointers meet at node 5. How do you find node 3?
4.List a is 2, 9, 7, 3, 6 and list b is 5, 1, 9, 7, 3, 6, where 7, 3, 6 are the same nodes in both. You level the lengths and then step both until the values are equal. What do you get?
5.Why can a doubly linked list unlink a node in O(1) given only that node, while a singly linked list can't?
6.You reverse a 5,000-node list with the short recursive version, one call per node, using Python's default settings. What happens?