LAB-10 Flashcards

1
Q

Connected Components CCs

A

ilands

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

Use flag visited and CC number

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

DFS backtracks but BFS don’t backtrack

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

Cycle Check - starts and ends at the same

Blue - explored
Orange - Visted
While - unvisited

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

In traversal . go in ascending order

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

Find what is topological sort?
can’t be done for undirected..

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

If you come across blue again in traversal then there is a cycle

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

Mark BLUE when you visit first. Mark as Orange when backtrack and no more paths.

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

zero in-degree. no incoming. Number of incoming are called in-degree

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

Explore Kahns method -> Topological sort (u should be smaller than v)

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

kahn’s algorithm for toposort

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

Kahn, delete edge and of no more incoming then duque that and enque next one onto queue

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

Use Graph for state modelling. Vertex is stage and edge is state transition. So, we can find any cyclic

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

In transport if price is different from A to B then it is directed as each direction has different price. If price is same then undirected

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

debrief

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