Sort Flashcards

1
Q

Selection Sort

A

find the smallest unsorted element in an array and swap it with the first unsorted element of that array

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

Bubble Sort

A

Swap adjacent paris of elements, if they are out of order, bubble up the highest number

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

Insertion Sort

A

Left to right in an array, shift elements one at a time

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

Merge Sort

A

Split the array into subarrays, then merge those subarrays back together in the correct order. Keep splitting in half.

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

Binary Search

A

Given a sorted array, divide and conquer by systimatically eliminating half of the remaining elements to find target

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

Linear search

A

iterate from left to right, try to find the target array

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