CP164 Lecture Notes - Lecture 17: Auxiliary Function, Linear Search, Binary Tree

43 views2 pages
School
Course
Professor

Document Summary

For recursion have a base case to stop ( must always return a value. Point of aux function is that we can do recursion of its components. Next is a hint for what to do for identical recursion. So far we have worked with linear data structures. Every node in a bst has a key value. For each node n the keys in the left subtree of n are less than the key of n and the keys in the right subtree of n are greater than the key of n. Keys are unique ( if u have value 5 no other node will have value 5) Height: where are you with respect to the bottom when you create a node it has a height of 1 has no children. All the descendents on right have a bigger value than parent. Loop will loop similar to a linear search.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents