Pergunta de entrevista da empresa Volt Information Sciences

Write an algorithm which takes as input a node and returns whether or not the tree structure contains a loop. Assume that a node has at most two pointers to children, but no pointers to parents.