Final Flashcards

(15 cards)

1
Q

Hashing

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

Collision

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

Open Hashing

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

Closed Hashing

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

Linear Probing

A

Upon collision, proceed to next available cell or cycle back to the first cell if the last cell is reached.

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

Linear Probing - Search

A

Search according to the hash function, and if another value occupies the expected cell, continue to the next until the expected value or an empty cell is found.

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

Linear Probing - Problems

A

Does not work if n (values) > m (keys)
Deletions are not straightforward

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

B-Tree

A

Aims to use the hard disk for storage as opposed to RAM. The memory only holds the addresses/pointers to the data.

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

B-Tree Definitions

A

A B-tree of order m is an m way tree.
# of keys in each non-leaf node = number of children -1, and keys partition the children like a search tree
All leaves on same level
All non-leaf nodes except root have >= ceil(m/2) children
Root has up to m children
Leaf contains no more than m-1 keys.
M should be odd (so there is a middle key)

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

Dynamic Programming

A

Solving problems defined by recurrences with overlapping sub problems.
ex: Fibonnaci sequence

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

Coin Row Problem

A

Row of n coins with positive integer values (not distinct)
Pick up maximum money without picking adjacent coins. Solve with dynamic programming

F(n) = max{F(n-2) + nth coin, F(n-1)}

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

Change Problem

A

Find the minimum number of coins to reach a total value n.

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

Blocking pair

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

Augmenting path

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

Stable marriage problem

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