01
How would you reverse a linked list?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceI would start with the iterative approach because it is the simplest to explain and the most space-efficient. I would keep three pointers: previous, current, and next, then walk through the list and flip each pointer one by one. The reason I choose this approach is that it gives me O(n) time and O(1) extra space. If the interviewer wanted a recursive version, I could explain that too, but I would mention it uses stack space. I would also call out edge cases like an empty list and a single-node list.