CS1021C Quiz 9 Key - Binary Search

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

1/9

flashcard set

Earn XP

Description and Tags

Flashcards covering key concepts related to binary search and recursive functions in programming.

Last updated 3:05 AM on 4/3/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

Binary Search

An efficient algorithm for finding an item from a sorted list of items, by repeatedly dividing the search interval in half.

2
New cards

Recursive Function

A function that calls itself to solve smaller instances of the same problem, commonly used in binary search.

3
New cards

Midpoint Calculation

In binary search, the midpoint is calculated as mid = (first + last) / 2 to determine the next point of comparison.

4
New cards

String Comparison

The process of comparing two strings to determine their lexicographical order.

5
New cards

Sorted List

A list of elements arranged in a defined order, usually ascending or descending based on some criterion.

6
New cards

Base Case

In recursive functions, the condition under which no further recursive calls are made; for binary search, when first > last.

7
New cards

Return Value

The output of a function; in this binary search function, it indicates the index of the found item or -1 if not found.

8
New cards

Difference (diff) in Binary Search

The result of comparing the key with the element at the midpoint: 0 for equal, negative for less, positive for greater.

9
New cards

First and Last Indices

Variables representing the current bounds of the search within the array; first is the starting index, last is the ending index.

10
New cards

Recursive Call

A call to a function within itself, enabling the function to continue working on smaller portions of the original problem.

Explore top notes

note
DIFFERENT ROCK DESCRIPTIONS
Updated 443d ago
0.0(0)
note
ELA Pronouns and Antecedents
Updated 1211d ago
0.0(0)
note
Wallerstein - World Systems Theory
Updated 1154d ago
0.0(0)
note
Social 20-1 Final Key terms
Updated 769d ago
0.0(0)
note
Chapter 16: Amines
Updated 1278d ago
0.0(0)
note
Pahoehoe to Mineral: 25 terms
Updated 678d ago
0.0(0)
note
DIFFERENT ROCK DESCRIPTIONS
Updated 443d ago
0.0(0)
note
ELA Pronouns and Antecedents
Updated 1211d ago
0.0(0)
note
Wallerstein - World Systems Theory
Updated 1154d ago
0.0(0)
note
Social 20-1 Final Key terms
Updated 769d ago
0.0(0)
note
Chapter 16: Amines
Updated 1278d ago
0.0(0)
note
Pahoehoe to Mineral: 25 terms
Updated 678d ago
0.0(0)