Searching CS 159

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

1/9

flashcard set

Earn XP

Description and Tags

For Final Exam

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

Midpoint And Narrowed

Binary Search checks the __________ of an array, then checks the midpoint of the ________ section, and repeats the process.

2
New cards

Sorted Array

In order to use binary search, the array must be a:

3
New cards

Until The Value is Found or There is Nothing More to Check

How many times is the step repeated for binary search in an array?

4
New cards

An Index in the Array Being Searched

What do first, mid, and max refer to in Searching?

5
New cards

index/2 And If Decimal, Round Down

How do you find the midpont of an array?

6
New cards

Index: 5 And Element: 6

What is the Index and What is the element for the midpoint of int x[10]?

7
New cards

Searching For Target Element From Left to Right

What is Linear Search in C?

8
New cards

No

Does the array need to be sorted for Linear Search?

9
New cards

Yes

Do the first, mid, and last variables changed as utilizing a search within an array?

10
New cards

When First > Last

When does binary search stop if it can not find the target number?