Pergunta de entrevista da empresa Electronic Arts

Given a binary tree, write a method that detects and removes any connections within the tree that form a cycle.