Algorithms Flashcards

(6 cards)

1
Q

Define the A* algorithm

A

A path finding algorithm that approximately finds the shortest path between two nodes by keeping track of the distance travelled from the source to the current node and the approximate distance from the next node the to the destination (heuristic function)

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

Define Dijkstra’s Shortest Path Algorithm

A

An algorithm to find the shortest path between two nodes on a graph by using a priority queue to keep track of the shortest distance to each node from the starting node until the destination node is found

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

Define an algorithm

A

A series of steps that completed a task

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

State the 3 objectives to consider when designing an algorithm

A
  • Completing the task
  • Getting the best time complexity
  • Getting the best space complexity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you reduce space complexity?

A

perform all the changes on the original pieces of data

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