Linked List Quiz
Editorial
15 questions across the four Linked List lessons: the order of pointer writes, reversing, fast and slow pointers, and merging and splitting. Pick an answer to see whether it's right and why. Nothing is saved, so you can take it again.
If one trips you up, its lesson is Introduction to Linked Lists, Reversing a Linked List, Fast and Slow Pointers or Merging and Splitting Linked Lists.
Quiz
1 / 15Multiple choice
Inserting 9 after 2 in 1 → 2 → 3, the code writes
two.next = node first, then node.next = two.next. What does the list read?Multiple choice
Delete Node in a Linked List gives you only the node 5 in 4 → 5 → 1 → 9, not the node before it. What works?
Multiple choice
Why put a dummy node before the head?
Multiple choice
Inserting a node between two nodes of a doubly linked list writes how many pointers?
Multiple choice
After reversing 10 → 20 → 30 with prev, curr and next, which holds the new head?
Multiple choice
Reverse Linked List II on 1 → 2 → 3 → 4 → 5 → 6, positions 3 to 5?
Multiple choice
Reverse Nodes in k-Group on 1 → 2 → 3 → 4 → 5 with k = 2?
Multiple choice
Middle of the Linked List on 1 to 8, with
while fast and fast.next?Multiple choice
1 → 2 → … → 10, and 10 points back to 4. Slow and fast meet, then one goes back to the head and both move one node at a time. Where do they meet?
Multiple choice
Remove the 3rd node from the end of 1 → 2 → 3 → 4 → 5 → 6?
Multiple choice
Is 7 a happy number?
Multiple choice
Merge Two Sorted Lists on 1 → 5 and 2 → 3 → 8?
Multiple choice
Odd Even on 1 → 2 → 3 → 4 joins the piles but never cuts. What does it read?
Multiple choice
Rotate List on 1 → 2 → 3 by k = 7?
Multiple choice
Add Two Numbers on 5 → 6 and 5 → 4 (65 + 45, ones digit first)?