Microquest interview question

Cycle detection in tree data structure