Linked List Cycle II
A medium-tier problem at 55% community acceptance, tagged with Hash Table, Linked List, Two Pointers. Reported in interviews at Ripple and 4 others.
Linked List Cycle II is the annoying version of cycle detection that actually matters in interviews. You don't just find out if a cycle exists, you have to return the node where it starts. Amazon, TikTok, and other big names ask it repeatedly. The acceptance rate sits around 55 percent, which means half the people who attempt it blank or time out. If you hit this during a live OA and freeze on the Floyd's algorithm math, StealthCoder surfaces a working solution in seconds while the proctor sees nothing. It's the hedge for the pattern you didn't drill.
Companies that ask "Linked List Cycle II"
Linked List Cycle II is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too.
Get StealthCoderThe trap is thinking you need a hash table to track visited nodes. You don't. The real solution uses two pointers and a mathematical property of cycles that most candidates miss during the test. Start with slow and fast pointers moving at different speeds until they collide inside the cycle. Then reset one pointer to the head and move both at the same speed. Where they meet is the cycle start. Why this works requires understanding the distance math, which is easy to blank on under pressure. Common failures happen when candidates overthink the collision detection or miscalculate pointer movement. This problem stacks Hash Table, Linked List, and Two Pointers concepts, so you need all three sharp. StealthCoder runs invisibly during the OA and solves it the moment you get stuck on whether your pointer logic is sound.
Pattern tags
You know the problem.
Make sure you actually pass it.
Linked List Cycle II recycles across companies for a reason. It's medium-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by an Amazon engineer who watched the leaked-problem repo become an industry secret. He decided you should have it too. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Linked List Cycle II interview FAQ
Is Linked List Cycle II still asked at Amazon and TikTok?+
Yes. It appears in reports from five major companies including Amazon and TikTok. The 55 percent acceptance rate suggests it's asked regularly enough that missing the pattern is a real risk during your assessment. It's not trendy, it's consistent.
What's the trick everyone misses?+
Two pointers at different speeds will collide inside the cycle. Then resetting one pointer to head and moving both at equal speed gets you to the start node. The math works because of the distance relationships, but candidates often skip the reset step or get confused on pointer movement during the live OA.
Do I really need a hash table for this?+
No. Hash Table is listed as a topic because it's a valid approach, but the optimal solution uses Two Pointers and avoids the space overhead. If you blank on the two-pointer trick during the assessment, a hash table fallback is acceptable but slower and space-inefficient.
How does this relate to general linked list interview prep?+
Cycle II is cycle detection plus one step. If you've only drilled basic cycle detection, this problem adds the 'find the start' requirement that trips people up. It's a natural escalation that interviewers use to separate prepared candidates from lucky ones.
Is this harder than basic cycle detection?+
Yes. The acceptance rate near 55 percent shows it's Medium for a reason. Basic cycle detection is easier because you just return true or false. Cycle II requires understanding pointer collision geometry and translating that into correct movement logic under time pressure.
Want the actual problem statement? View "Linked List Cycle II" on LeetCode →