From d833d16444d17a7675d6e5e9d00f7648aab6a458 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Mon, 24 Mar 2025 17:58:33 -0400 Subject: [PATCH] moving image to lecture 20 --- lectures/19_trees_II/README.md | 11 ++++++----- .../ds_set_history.png | Bin 2 files changed, 6 insertions(+), 5 deletions(-) rename lectures/{19_trees_II => 20_trees_III}/ds_set_history.png (100%) diff --git a/lectures/19_trees_II/README.md b/lectures/19_trees_II/README.md index 5a42066..7e4cf44 100644 --- a/lectures/19_trees_II/README.md +++ b/lectures/19_trees_II/README.md @@ -86,7 +86,7 @@ point to the “in-order predecessor”. – Each node stores a parent pointer. Only the root node has a null parent pointer. [method 1] - – Each iterator maintains a stack of pointers representing the path down the tree to the current node. [method 2] + – Each iterator maintains a container of pointers representing the path down the tree to the current node. [method 2] - If we choose the parent pointer method, we’ll need to rewrite the insert and erase member functions to @@ -99,11 +99,12 @@ Be sure to draw a picture to help you understand! ![alt text](ds_set_parent_ptrs.png "ds set parent ptrs") Exercise: [method 2] Write a fragment of code that given a tree iterator containing a pointer to the node and a -stack of pointers representing path from root to node, finds the in-order successor (without using parent pointers). -Either version can be extended to complete the implementation of increment/decrement for the ds_set tree iterators. -![alt text](ds_set_history.png "ds set history") +container of pointers representing path from root to node, finds the in-order successor (without using parent pointers). +Either version can be extended to complete the implementation of increment/decrement for the ds_set tree iterators. (This method will be covered in the next lecture) -Exercise: What are the advantages & disadvantages of each method? + + + ## 19.5 Limitations of Our BST Implementation diff --git a/lectures/19_trees_II/ds_set_history.png b/lectures/20_trees_III/ds_set_history.png similarity index 100% rename from lectures/19_trees_II/ds_set_history.png rename to lectures/20_trees_III/ds_set_history.png