Marvell Technology interview question

Algorithm to find loop in a linked list?

Interview Answer

Anonymous

1 Apr 2021

Two pointer approach one pointer increments by one position while other by two positions, if they meet then loop otherwise not.