How would I go about finding a leaf node to allocate a new node in a binary tree, such as:
var subTree = new NGenerics.DataStructures.Trees.BinaryTree<int>(2);
if (!parentTree.IsFull)
{
// goes directly under
parentTree.Add(consTree);
}
else
{
// find the next leaf node under this tree
//parentTree.BreadthFirstTraversal(
//parentTree.FindNode(
}
It seems FindNode() iterates over the entities and not the nodes itself?