Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode OS program
Title: 66 Download
 Description: Through and user interaction, according to the first input sequence traversal of a binary tree, the structure of the binary number using arrays to store, according to the hierarchical traversal to node numbering, father nodes contact about children through the two formulas, such as father node is I, the left child of 2 + 1, I right child of 2 + 2. I initial array were assigned into an asterisk, the user can enter any value within the ASCII theoretically, but in favor of validation, can only enter characters (except as a symbol of the asterisk, enter the node without data). The program of the first order, first order output and the output sequence is realized by using stack and circulation, sequence output are implemented using recursion, after first order done subroutine, using the logic, the leaf nodes, build complete tree, and the user to enter the carriage returns, and so on and so forth with jump statements to jump back to think about, so that it only contains about the child's binary tree, it can be right into the stack, visit left subtree, then cycle. The rest of the things considered separately, such as leaf nodes, you can access it, and then play the stack cycle, this is from general to specific, make problems become simple and easy to consider. Because of the nodes are numbered according to the levels, so the prompt statement must initialize the serial number.
 To Search:
File list (Check if you may need any files):

CodeBus www.codebus.net