This commit is contained in:
Jidong Xiao
2024-04-02 11:40:10 -04:00
2 changed files with 10 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
# Lecture 21 --- Trees, Part IV
Review from Lecture 19
Review from Lecture 20
- Breadth-first and depth-first tree search
- Increement/decrement operator
- Tree height, longest-shortest paths, breadth-first search
@@ -77,7 +77,9 @@ Which nodes are red?
## 21.3 Trinary Tree
A **trinary tree** is similar to a binary tree except that each node has at most 3 children. Write a **recursive** function named **EqualsChildrenSum** that takes one argument, a pointer to the root of a trinary tree, and returns true if the value at each non-leaf node is the sum of the values of all of its children and false otherwise. In
A **trinary tree** is similar to a binary tree except that each node has at most 3 children.
Write a **recursive** function named **EqualsChildrenSum** that takes one argument, a pointer to the root of a trinary tree, and returns true if the value at each non-leaf node is the sum of the values of all of its children and false otherwise. In
the examples below, the tree on the left will return true and the tree on the right will return false.
```cpp

View File

@@ -1,4 +1,4 @@
# Lecture 22 --- Trees, Part V + Problem Solving Techniques
# Lecture 22 --- Trees, Part V plus bonus lecture on Problem Solving Techniques
## Test 3 Information
@@ -18,7 +18,11 @@
- Going in to the test, you should know what big topics will be covered on the test. As you skim through the problems, see if you can match up those big topics to each question. Even if you are atimped about how to solve the whole problem, or some of the details of the problem, make sure you demonstrate your understanding of the big topic that is covered in that question.
- Re-read the problem statement carefullt. Make sure you didn't miss anything.
Today's lecture:
# Review from Lecture 21
- Red Black tree
- B+ Trees
# Today's lecture:
- Exercises
- Problen Solving Techniques