trees and algorithms Flashcards

1
Q

define a tree

A

a graph where nodes are undirected and do not loop

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

what data structure would you use for a breadth first search

A

queue

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

describe djikstras algorithm

A

visit all nodes, starting with shortest range, update the shortest distance to the current node based on shortest distance so far, making sure nodes are visited once complete. then work backwards to confirm shortest path.

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