Pregunta de entrevista de Amazon

Implement a function to reverse a singly linked list. They also asked me to discuss its time complexity and potential edge cases.

Respuesta de la entrevista

Anónimo

13 nov 2025

I explained the iterative method to traverse the list, update pointers to reverse the order, wrote pseudocode, and discussed how the solution runs in O(n) time with O(1) additional space.