From 97efdf8740fcb5adc882244a27ba5568e9dc936e Mon Sep 17 00:00:00 2001 From: NehaKeshan <39170739+NehaKeshan@users.noreply.github.com> Date: Fri, 22 Mar 2024 13:05:23 -0400 Subject: [PATCH] Update README.md Removed traversing portion --- lectures/18_trees_I/README.md | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lectures/18_trees_I/README.md b/lectures/18_trees_I/README.md index 70f8658..48024ce 100644 --- a/lectures/18_trees_I/README.md +++ b/lectures/18_trees_I/README.md @@ -140,22 +140,5 @@ finding the node in the tree that stores the smallest value. 2. Write a recursive version of the function find. -## 17.10 In-order, Pre-Order, Post-Order Traversal - -- One of the fundamental tree operations is “traversing” the nodes in the tree and doing something at each node. -The “doing something”, which is often just printing, is referred to generically as “visiting” the node. -- There are three general orders in which binary trees are traversed: pre-order, in-order and post-order. - In order to explain these, let’s first draw an “exactly balanced” binary search tree with the elements 1-7: - - – What is the in-order traversal of this tree? Hint: it is monotonically increasing, which is always true for -an in-order traversal of a binary search tree! - - – What is the post-order traversal of this tree? Hint, it ends with “4” and the 3rd element printed is “2”. - - - - – What is the pre-order traversal of this tree? Hint, the last element is the same as the last element of the -in-order traversal (but that is not true in general! why not?) -