Searching/Sorting Algorithms Flashcards

1
Q

Sorting algorithm that treats input as two parts, sorted and unsorted. Uses i and j to repedeatley select the proper next value to swap to the end of the sorted part of the list. j is ahead of i by one index and compares the previous value to the current value. j < i.

A

Selection Sort

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

Sorting algorithm that treats input as two parts, sorted and unsorted. Repeatedly inserts the next value from the unsorted part into the correct location in the sorted part. j < j -1

A

Insertion Sort

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

Sorting algorithm that repeatedly partitions the input into low and high parts (each unsorted), and then recursively sorts each of those parts. To partition the input, quicksort chooses a pivot to divide the data into low and high parts.

A

Quick Sort

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

Sorting algorithm that divides a list into two halves, recursively sorts each half, and then merges the sorted halves to produce a sorted list. The recursive partitioning continues until a list of one element is reached, as a list of one element is already sorted.

A

Merge Sort

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

A sorting algorithm designed specifically for integers. The algorithm makes use of a concept called buckets and is a type of bucket sort.
Any array of integer values can be subdivided into buckets by using the integer values’ digits. A bucket is a collection of integer values that all share a particular digit value

A

Radix Sort

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

is a sorting algorithm that treats the input as a collection of interleaved lists, and sorts each list individually with a variant of the insertion sort algorithm. Shell sort uses gap values to determine the number of interleaved lists. A gap value is a positive integer representing the distance between elements in an interleaved list. For each interleaved list, if an element is at index i, the next element is at index i + gap value

A

Shell Sort

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

A sorting algorithm that iterates through a list, comparing and swapping adjacent elements if the second element is less than the first element. Bubble sort uses nested loops.

A

Bubble Sort

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

A numerical sorting algorithm that distributes numbers into buckets, sorts each bucket with an additional sorting algorithm, and then concatenates buckets together to build the sorted result. A bucket is a container for numerical values in a specific range

A

Bucket Sort

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