Pergunta de entrevista da empresa Lumen

to find the last node and the first node in a circular linked list