employer cover photo
employer logo
employer logo

Cerebry (Singapore)

Is this your company?

Cerebry (Singapore) Interview Question

Detecting a loop in a linked list

Interview Answer

Anonymous

Dec 7, 2023

Detecting a loop in a linked list can be done using Floyd's Tortoise and Hare algorithm. It involves two pointers moving at different speeds; if they meet, there's a loop.