midterms 2

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/9

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

Bubble sort's big O time complexity is __.

O(n^2)

2
New cards

In a stable sort, when two elements have the same value, __.

their relative positions are maintained.

3
New cards

The method of sorting that involves checking if the list is already sorted and stopping if it is is called __.

adaptability.

4
New cards

The space complexity for bubble sort is __.

O(1)

5
New cards

Bubble sort is considered __ because it can be modified to check for swaps after each iteration.

adaptable.

6
New cards

The type of sort where the largest or smallest element is swapped with the last unsorted element in each iteration is called __.

selection sort.

7
New cards

Bogo sort is considered a bad sorting algorithm because it relies on __.

randomly shuffling the list and checking if it's sorted.

8
New cards

The __ algorithm is faster and more efficient compared to a linear search.

binary search.

9
New cards

The process of moving elements to their proper positions in sorting is often described as __.

bubbling.

10
New cards

In terms of sorting algorithms, __ refers to how well the algorithm maintains the original order of equal elements after sorting.

stability.