Energy Exemplar interview question

Detect loop in a linked list

Interview Answer

Anonymous

28 Aug 2024

2) The second question was to detect loop in a linked list, I gave the tortoise and hare approach to detect cycle in a linked list and the interviewer also asked me to write a code for it.