Questions: Circular Linked Lists

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

You are traversing a circular linked list using the loop `while (current != null) { current = current.next; }`. What happens?

AThe loop terminates correctly when it reaches the last node
BThe loop runs forever, because no node's next pointer is null
CThe loop terminates after visiting half the nodes
DA NullPointerException is thrown on the second pass
Question 2 Multiple Choice

You need to merge two circular linked lists, given one pointer to any node in each list. What is the minimum time complexity for this operation?

AO(n) — you must traverse both lists to find all nodes
BO(n log n) — merging requires sorting the two sequences
CO(1) — swap two next pointers to splice the loops together
DO(n²) — each node in one list must be linked to each node in the other
Question 3 True / False

Circular linked lists are generally faster than singly linked lists for the same sequential access workload.

TTrue
FFalse
Question 4 True / False

In a round-robin job scheduler implemented with a circular linked list, advancing from the last job in the list automatically brings you back to the first job without any conditional reset logic.

TTrue
FFalse
Question 5 Short Answer

Why does traversing a circular linked list require a different termination condition than traversing a singly linked list, and what are two valid approaches?

Think about your answer, then reveal below.