Fundamental Algorithms8 sections · 291 units
Open in CourseQuiz: Fast and Slow Pointers
Test your understanding
Check Your Understanding
Using fast and slow pointers, how do you find the middle of a linked list?
- A.When fast reaches the end, slow is at the middle
- B.Move slow until it equals fast
- C.Count nodes first, then traverse to middle
- D.Use two passes with different speeds