Qualcomm interview question

Develop an algorithm to detect a cycle in a Linked-List.

Interview Answers

Anonymous

May 22, 2020

I suggested Floyd's algorithm, which he accepted, but then he wanted another solution that could be less optimal.

Anonymous

Feb 18, 2021

store every node in a hashmap and check