Algorithms Flashcards

1
Q

Bubble sort

A

A simple comparison-based algorithm where each pair of adjacent elements is compared and swapped if they are in the wrong order. Repeated until the array is sorted

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

Merge sort

A

A divide-and-conquer algorithm that divides the array into halves, recursively sorts each half, and then merge the sorted halves

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

Quick sort

A

Dive and conquer algorithm that selects a pivot, partitions the array around the pivot, and recursively sorts the partitions

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

Linear search

A

Sequentially checks each element of the list until the target value is found or the list ends

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

Binary search

A

Efficiently searches a sorted array by repeatedly dividing the search interval in half

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