Chapter 9 Sorting and Searching Arrays

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

1/11

flashcard set

Earn XP

Description and Tags

9.1; 9.2; 9.3; 9.4; 9.5;

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

sorting algorithm

a technique for stepping through an array and rearranging its contents in some order

2
New cards

ascending order

order of the values in the array which are stored from lowest to highest

3
New cards

descending order

order of the values which are stored from highest to lowest

4
New cards

bubble sort, selection sort, insertion sort

three sorting algorithms to sort data in an array

5
New cards

bubble sort

sort algorithm that makes passes through and compares the elements of the array, certain values “bubble” toward the end of the array with each pass

6
New cards

selection sort

sort algorithm that works like this: The smallest value in the array is located and moved to element 0. Then, the next smallest value is located and moved to element 1. This process continues until all of the elements have been placed in their proper order.

7
New cards

insertion sort

sort algorithm that sorts the first two elements, which become the sorted part of the array. It then inserts each of the remaining elements, one at a time, into the sorted part of the array at the correct location

8
New cards

binary search

search algorithm that locates an item in an array by repeatedly dividing the array in half.

9
New cards

ASCII

When sorting an array of string values, the comparisons are made on the basis of the ________ values of the array elements.

10
New cards

once

In the bubble sort algorithm, the inner loop iterates ________ for each of the unsorted array elements.

11
New cards

two

In a selection sort, to change from ascending to descending order, only ________ modifications need to be made to the algorithm.

12
New cards

temporary

To successfully swap the contents of two variables, we need a third variable that can serve as a ________ storage location.