Pergunta de entrevista da empresa Xtreme Labs

Find if there is a loop in a link list

Resposta da entrevista

Sigiloso

12 de mai. de 2017

Check the length of the list, then iterate over each element while incrementing a counter. If the counter becomes larger than the length of the list, you have a loop.