CSS100 - CHAPTER 3

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

1/17

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

searching

The task of finding a specific value in a list of values, or deciding it is not there

2
New cards

sorting

The task of putting a list of values into numeric or alphabetical order

3
New cards

selection sort algorithm

A sorting algorithm that keeps moving larger items toward the back of the list.

4
New cards

order of magnitude (n^2)

The efficiency classification of an algorithm whose work varies as a constant times the square of the input size n

5
New cards

shuffle-left algorithm

It is space efficient because it only requires four memory locations to store the quantities n, legit, left, and right in addition to the memory required to store the list itself.

6
New cards

copy-over algorithm

It scans the list from left to right, copying every legitimate (nonzero) value into a new list that it creates. After this algorithm is finished, the original list still exists, but so does a new list that contains only nonzero values.

7
New cards

copy-over algorithm

The best case for this algorithm occurs if all elements are 0

The worst case occurs if there are no 0 values in the list.

8
New cards

shuffle-left algorithm

The best case occurs when the list has no 0 values because no copying is required.

The worst case occurs when the list has all 0 values.

9
New cards

converging-pointers algorithm

The best case for this algorithm is a list containing no 0 elements.

The worst case is a list of all 0 entries.

10
New cards

binary search algorithm

An algorithm that searches for a target value in a sorted list by checking at the midpoint and then repeatedly cutting the search section in half

11
New cards

polynomially bounded

An algorithm that does less work than some polynomial expression of the input size n

12
New cards

exponential algorithm

An algorithm whose work varies as some constant to the power of the input size n.

13
New cards

intractable

A problem for which no polynomially bounded solution exists

14
New cards

approximation algorithms

An algorithm that doesn’t give the exact answer to a problem, but provides a close approximation to a solution

15
New cards

bubble sort

A sorting algorithm that makes multiple passes through the list from front to back, each time exchanging pairs of entries that are out of order

16
New cards

smart bubble sort

A variation of the bubble sort algorithm that stops when no exchanges occur on a given pass

17
New cards

mergesort

A sorting algorithm that breaks the list to be sorted into smaller and smaller lists and then assembles the smaller sorted lists back into larger and larger sorted lists

18
New cards

benchmarking

Running a program on many data sets to be sure its performance falls within required limits; timing the same algorithm on two different machines