JAVA binary tree ghostwriting, ghostwriting java binary tree programming job
Binary tree operation
1. The problem describes
operations on binary trees.
2. The basic requirements are to
define the functions that implement the following binary tree operations (non-recursive methods are required)
⑴ Input a complete binary tree, save the tree in a one-dimensional array AT[N], and AT[N] stores the
value of each node, Design an algorithm to sequentially read the value of each node starting from AT[0], establish a binary
linked list representation of the binary tree, and return the pointer of the root node of the tree represented by the established binary linked list;
⑵ According to the binary linked list The represented tree calculates the pointer and
maximum value of the first node with the largest value in the binary tree ;
(3) According to the tree represented by the binary linked list, return the pointer of the parent node of the node with the specified value, if not,
return NULL;
(4) Calculate the height of the binary tree;
(5) Calculate the width of the binary tree, that is, on each layer of the binary tree, the number of nodes on the layer with the largest number of
nodes.
(6) According to the tree represented by the binary linked list, exchange the two child nodes of each node in the binary tree.
3. Test data: determined by the students
23 / 43
16. The establishment of the tree and its operation
1. The problem describes
the operation of the tree.
2. Basic requirements ⑴ tree establishment: input an n -ary tree (n≥3)
from the keyboard in the form of (node number, node data, parent node number) , the parent node number of the root node is -1,
Store the tree in a one-bit array in parent notation
.
(2) Output of the tree: convert the established tree stored in parental notation to form a child-sibling linked list method
format and output.
(3) Preorder traversal of the tree: traverse the tree according to the preorder traversal method, and output the corresponding traversal sequence.
⑷ Post-order traversal of the tree: traverse the tree in the post-order traversal mode, and output the corresponding traversal sequence.
⑸ Hierarchical traversal of the tree: traverse the tree according to the hierarchical traversal method, and output the corresponding traversal sequence.
⑹ Statistics of node degrees in the tree: Count the number of nodes with degrees 0, 1, 2... in the tree respectively.
⑺ Design a menu, the above operation requirements are used as the main menu items in the menu.
http://www.6daixie.com/contents/14/1353.html
The core members of the team mainly include Silicon Valley engineers, BAT front-line engineers, top 5 master and doctoral students in China, and are proficient in German and English! Our main business scope is to do programming assignments, course design and so on.
Our field of direction: window programming, numerical algorithm, AI, artificial intelligence, financial statistics, econometric analysis, big data, network programming, WEB programming, communication programming, game programming, multimedia linux, plug-in programming program, API, image processing, embedded/MCU database programming, console process and thread, network security, assembly language hardware Programming software design engineering standards and regulations. The ghostwriting and ghostwriting programming languages or tools include but are not limited to the following:
C/C++/C# ghostwriting
Java ghostwriting
IT ghostwriting
Python ghostwriting
Tutored programming assignments
Matlab ghostwriting
Haskell ghostwriting
Processing ghostwriting
Building a Linux environment
Rust ghostwriting
Data Structure Assginment
MIPS ghostwriting
Machine Learning homework ghostwriting
Oracle/SQL/PostgreSQL/Pig database ghostwriting/doing/coaching
web development, website development, website work
ASP.NET website development
Finance Insurance Statistics Statistics, Regression, Iteration
Prolog ghostwriting
Computer Computational method
Because professional, so trustworthy. If necessary, please add QQ: 99515681 or email: [email protected]
WeChat: codinghelp