Write a non-recursive function, in any programming language, to check if there is a cycle in a Binary Search Tree. A Cycle being any node that loops back to another node.
Sigiloso
I used a variation of a Best First Search Algorithm and expanded each node while going through it.