public string PreOrderTraverse() { BSTTraversalEngine.PreOrderEngine(Root); var resultList = BSTTraversalEngine.Prefix; BSTTraversalEngine.Prefix.Clear(); return(string.Join(" ", resultList));; }
public string InOrderTraverse() { BSTTraversalEngine.InOrderEngine(Root); var resultList = BSTTraversalEngine.Infix; var resultString = string.Join(" ", resultList);; BSTTraversalEngine.Infix.Clear(); return(resultString); }
public string PreOrderTraverse(INode node) { BSTTraversalEngine.PreOrderEngine(node); var resultList = BSTTraversalEngine.Prefix; var resultString = string.Join(" ", resultList); BSTTraversalEngine.Prefix.Clear(); return(resultString); }