sorting Flashcards

1
Q

bubble sort

A

simple but inefficient
used for smaller lists but are nearly sorted
o(n^2)

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

insertion sort

A

more efficient than a bubble sort as doesnt require mutltiple passes
if it is used for a list which is nearly sorted time complexity goes from o(n^2) to o(n)

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

merge sort

A

uses divide an conquer to separate elemts, orders them the merges them together
recursive
more efficient than bubble and sort
it will sort a large list faster
o(nlogn)
requires more memory for merging process

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

quick sort

A

uses divide and conquer to solve problem
doesnt require additional memory space
o(n logn)

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

djikstraa

A

finds the shortest path between start node and other nodes in a weighted path

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

a*

A

alternative to djikstraa because of use of heuristics
focuses only on reaching end noth whereas djikstraa focuses on the lowest cost shortest path between every node

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