Coding & Algorithms (DSA)
Linked Lists
5 practice questions. Free questions open a full answer guide; the rest unlock with Pro.
- Why does reversing a singly linked list run in O(n) time and O(1) space, and what state do you have to track to avoid losing the rest of the list?
- What advantages does a linked list have over a dynamic array, and what do you give up by choosing it?Go Pro
- Walk me through how Floyd's tortoise-and-hare detects a cycle in a linked list, and why you'd choose it over a hash set of visited nodes — or when you wouldn't.Go Pro
- How would you detect whether a linked list has a cycle, and how does the technique you'd use keep memory constant?Go Pro
- Reversing a singly linked list in place is a common task that engineers still get subtly wrong. Walk me through the pointer manipulation, the off-by-one traps, and how you'd convince yourself the result is correct.Go Pro
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.