private void InorderTraversal(Node958_V1 node, int level) { if (node == null) { return; } InorderTraversal(node.Left, level + 1); _levels[level].Add(node); InorderTraversal(node.Right, level + 1); }
private int CalculateHeight(Node958_V1 node) { if (node == null) { return(0); } var leftHeight = CalculateHeight(node.Left); var rightHeight = CalculateHeight(node.Right); return(1 + Math.Max(leftHeight, rightHeight)); }
public bool IsCompleteTree(Node958_V1 node) { throw new NotImplementedException(); }