COT 3400 - Week 1 (Mon): Algorithms & Insertion Sort

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

1/6

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core concepts from Day 1: what an algorithm is, insertion sort, the role of the sorted portion, insertion steps, runtime implications, and tracing an algorithm.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

7 Terms

1
New cards

Algorithm

A finite, well-defined sequence of steps that, when executed, produces an output and terminates in finite time.

2
New cards

Insertion Sort

A sorting algorithm that builds a sorted prefix by inserting each new element into its correct position within the prefix, using comparisons and swaps as needed.

3
New cards

Sorted portion (sorted prefix)

The portion of the array that has already been arranged in non-decreasing order by the algorithm.

4
New cards

Insertion operation

The step of placing the current element into its correct position within the sorted portion by shifting/swapping elements.

5
New cards

Runtime depends on input order

The amount of time an algorithm takes can vary with how the input is arranged; for insertion sort, best-case occurs with already-sorted input, worst-case with reverse-ordered input.

6
New cards

Trace (algorithm trace)

A step-by-step recording of an algorithm’s execution showing values of variables and decisions to illustrate flow.

7
New cards

Input order effect

The influence of the initial arrangement of input elements on performance; in insertion sort, reverse order increases work compared to sorted order.