The 04th homework - tree Huffman tree (2) C++ detailed explanation

1. Learning summary

1.1 Tree structure mind map

 

1.2 Tree structure learning experience

Tree structure understanding: A tree is a nonlinear structure, each node has 0 or more successor nodes, and there is only one predecessor node (except the root node). In a tree, recursive methods can be considered at the top of the list

Difficulties encountered in learning this structure: recursive calls are not very clear, the amount of code is large, and it is difficult to remember.

Tree structure: Solving optimal solutions, equivalence problems, expression evaluation, Huffman coding.

2.PTA experiment work

The specific writing content and format are as follows:


2.1 Topic 1: 6-1 jmu-ds-binary tree operation set (20 points)

2.2 Design ideas (pseudo code or flowchart)

 

2.4 PTA Submission List Instructions.

 


2.1 Topic 2: 6-4 jmu-ds-expression trees (25 points)

2.2 Design ideas (pseudo code or flowchart)

 


2.3 Code screenshots (note, screenshots, screenshots, screenshots. Do not paste the code on the blog. Do not use the syntax to render)

 

 

2.4 PTA Submission List Instructions.

 


 

2.1 Topic 3: 7-3 jmu-ds-level traversal of binary tree (25 points)

2.2 Design ideas (pseudo code or flowchart)

 


2.3 Code screenshots (note, screenshots, screenshots, screenshots. Do not paste the code on the blog. Do not use the syntax to render)

 

2.4 PTA Submission List Instructions.

It has been segfaulting because the hierarchical traversal did not judge that the tree is not empty


 

3. Screenshot of the PTA final ranking of this week's topic set

3.1 Screenshot of PTA ranking

 

3.2 My total score: 230 2 points

4. Read the code (required)

Must do this time

5. Screenshot of code Git commit record

 


 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325298621&siteId=291194637