DS&A Flashcards

1
Q

Process of returning to a previous state in the algorithm’s execution path when a terminal condition is reached to explore alternative possibilities

A

backtrack step

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

this list type stores each node’s outgoing neighbors in its value array

A

An adjacency list

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

Technique used to eliminate unnecessary exploration of the state space / Like taking shortcuts in our search by avoiding paths we know won’t lead to a solution

A

Pruning

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

L._. nodes do not have any children.

A

Leaf nodes do not have any children.

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

Condition telling us when to stop exploring a particular path. Could be due to a solution or because we’ve reached a dead end

A

terminal condition

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

Potential choice or element that we can add to current partial solution

A

candidate

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

the height of “p_____” binary trees grows logarithmically.

A

the height of ->”perfect”<- binary trees grows logarithmically.

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

On average, searching for an element in a balanced Binary Search Tree takes O(_ ? _ ) time, where N is the number of nodes

A

On average, searching for an element in a balanced BST takes O(log N) time, where N is the number of nodes

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

Full Binary Trees: Every node has either_ or_ children

A

Full Binary Trees: Every node has either zero or two children

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

Complete Binary Trees: All levels are completely filled with nodes, except possibly for the l____ level (nodes are filled from l____ to r____ on the last level)

A

Complete Binary Trees: All levels are completely filled with nodes, except possibly for the last level (nodes filled from left to right on last level)

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

Represent hierarchical structures or processes with a clear direction and no repetition;
No loops; once you go down a path, there’s no way back up;

A

acyclic graph

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

At least one loop where you can start and end at same vertex; Useful for modeling systems that can return to their initial state

A

cyclic graph

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

Balanced Binary Trees: the height of left and right subtrees of any node differs by at most ._.

A

Balanced Binary Trees: the height of left and right subtrees of any node differs by at most one

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

Tree structure representing state space

A

state space tree

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

B________ed Binary Trees: the height of left and right subtrees of any node differs by at most one

A

Balanced Binary Trees: the height of left and right subtrees of any node differs by at most one

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

the height of perfect binary trees grows l________y.

A

the height of perfect binary trees grows logarithmically.

17
Q

N____ branching logic refers to the approach where we explore every possible option at each step without any early pruning or optimization

A

Naive branching logic refers to the approach where we explore every possible option at each step without any early pruning or optimization

18
Q

Set of all possible states in problem / all possible configurations or situations that may be encountered

A

state space