206. Reverse Linked List
Question
Reverse a singly linked list.
Quick Hints
Solution
Iterative:
Recursive:
Time complexity
O (n)
Space complexity
O(1)
for iterative O(n)
for recursive
Reverse a singly linked list.
O (n)
O(1)
for iterative O(n)
for recursive