private static int CalculateSize(INode node)
{
if (node.Left() != null && node.Right() != null && !node.IsLeaf())
{
return CalculateSize(node.Left()) + CalculateSize(node.Right());
;
}
if (node.Left() == null && node.Right() == null && node.IsLeaf())
{
return node.Size();
}
throw new Exception("Badly Constructed INode Tree");
}