Week 4: Binary Search Trees Flashcards
What is a dictionary / map?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/213/421/a_image_thumb.png?1657914025)
What is an ordered dictionary/map?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/097/a_image_thumb.png?1657914045)
What is a total order?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/122/a_image_thumb.png?1657914064)
What methods are in an ordered dictionary ADT?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/136/a_image_thumb.png?1657914112)
What is a search table?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/180/a_image_thumb.png?1657914144)
What are the time complexities of the following methods for a search table using a sorted array:
get()
put(k,data)
remove(k)
smallest()
largest()
predecessor()
successor()
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/218/a_image_thumb.png?1657914259)
What is the hash table implementation of a search table? What are the time complexities of the following methods:
get
put
remove
smallest
largest
predecessor
successor
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/335/a_image_thumb.png?1657914327)
What is a binary search tree?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/367/a_image_thumb.png?1657914352)
Where is the information stored in a binary search tree?
Internal nodes
An inorder traversal of a BST visits keys in what order?
Increasing order
What is the basis of the smallest() operator for BST’s? What is the algorithm? What is the time complexity?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/490/a_image_thumb.png?1657914550)
What is the basis of the get() operator for BST’s? What is the algorithm? What is the time complexity?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/532/a_image_thumb.png?1657914621)
What is the basis of the put() operator? What is the algorithm? Time complexity?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/573/a_image_thumb.png?1657914666)
What is the basis of the remove operator?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/601/a_image_thumb.png?1657914728)
What is the algorithm for the remove method? Time complexity?
![](https://s3.amazonaws.com/brainscape-prod/system/cm/390/214/681/a_image_thumb.png?1657914768)