Week 4: Binary Search Trees Flashcards

1
Q

What is a dictionary / map?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an ordered dictionary/map?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a total order?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What methods are in an ordered dictionary ADT?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a search table?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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()

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a binary search tree?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where is the information stored in a binary search tree?

A

Internal nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

An inorder traversal of a BST visits keys in what order?

A

Increasing order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the basis of the smallest() operator for BST’s? What is the algorithm? What is the time complexity?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the basis of the get() operator for BST’s? What is the algorithm? What is the time complexity?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the basis of the put() operator? What is the algorithm? Time complexity?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the basis of the remove operator?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the algorithm for the remove method? Time complexity?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the algorithm for the successor operation? What is the time complexity?

A