Pergunta de entrevista da empresa Foundation Devices

Write a function that can detect a cycle in a linked list.