Module 5

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/3

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:22 AM on 6/2/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

4 Terms

1
New cards

Sorting

The process of putting a collection of elements into ascending (or descending) order.

2
New cards

Selection sort

A sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly selects the minimum value to move from the unsorted part to the end of the sorted part. O(N²) because there are two nested loops.

3
New cards

Insertion Sort

A sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly inserts the next value from the unsorted part into the correct location in the sorted part. O(N²)

4
New cards

Nearly sorted arrays

Contains only a few elements not in sorted order. Insertion sort runtime differs for a nearly sorted input. O(N) b/c O((N-C)*1sorted elements+C*Nunsorted elements)