So, my code stop running when a node is null, but i .
Node node = nodeMap[x]; (BREAKS HERE case x isn't in the tree yet)
if(node == null)
{
node = new Node();
node.Equals(x);
nodeMap.Add(x, node);
}
ERROR: An unhandled exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in System.dll
Additional information: The key is not in the dictionary.