Pergunta de entrevista da empresa NVIDIA

find a loop in two lists and then find the first node in the circle