LinkedLists Flashcards

1
Q

How to reverse linked list using O(1) space?

A

Using three pointers, curr, next and prev

https://leetcode.com/problems/reverse-linked-list/submissions/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to find middle of the linked list ?

A

Using fast/slow pointer technique.

https://leetcode.com/problems/middle-of-the-linked-list/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly