mid2 Flashcards

1
Q

Push LL Complexity

A

O(1)

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

Pop LL Complexity

A

O(1)

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

Push AL Complexity

A

O(N)/*O(1)

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

Pop AL Complexity

A

O(N)/*O(1)

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

Enq LL Complexity

A

O(1)

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

Deq LL Complexity O(1)

A

O(1)

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

Enq AL Complexity

A

O(N)/*O(1)

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

Deq AL Complexity

A

O(N)

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

Enq AL Circular Complexity

A

O(N)/*O(1)

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

Deq AL Circular Complexity

A

O(N).*O(1)

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

RBT additional reqs

A

-Each Node is either red or black
-Root is always black
-Every path from root to all null leaves encouters the same # of black nodes
-No adjacent (parent/child) red nodes

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

Breadth-first order

A

Print in perfect horizontal order

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

Preorder

A

Head -> Left -> Right

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

Postorder

A

Left -> Right -> Head

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

In order

A

/\ Formation, Left -> Head -> Right

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

Left child location in AL

A

2 * i + 1

17
Q

Right child location in AL

A

2 * i + 2

18
Q

Parent location in AL

A

floor((i-1)/2)

19
Q

AVL search insert delete complexity

A

O(logN)

20
Q

Complete binary tree

A

Every node is as far left as possible, every level except possibly the last level is filled

20
Q

Full Binary Tree

A

Every node has either 0 or 2 children

21
Q
A