Linear and Binary Searching

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

1/18

flashcard set

Earn XP

Description and Tags

Flashcards on Linear and Binary Searching Algorithms

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

Data storage and retrieval

Putting a data item in a store and retrieving a specific item.

2
New cards

Fast Storage (Slow Retrieval)

Appending the latest data to the end of the store, resulting in fast storage but slow retrieval.

3
New cards

Slow Storage (Fast Retrieval)

Maintaining data in sorted order, resulting in slow storage but fast retrieval using binary search.

4
New cards

Theoretical Time Complexity

The relationship between the size of the input and the algorithm's running time.

5
New cards

Big-O Notation

Captures the upper bound on the time required for an algorithm to run based on the input size.

6
New cards

Constant Time

O(1)

7
New cards

Logarithmic Time

O(log N)

8
New cards

Linear Time

O(N)

9
New cards

N log N Time

O(N log N)

10
New cards

Quadratic Time

O(N^2)

11
New cards

Cubic Time

O(N^3)

12
New cards

Exponential Time

O(2^N)

13
New cards

Linear Searching

Scanning through array elements to find the index of the first occurrence of an integer x in an unsorted array.

14
New cards

Complexity of Linear Search Algorithm

O(N)

15
New cards

Binary Search

An algorithm that can only be used on sorted arrays and has a better theoretical time complexity than linear searching.

16
New cards

Complexity of Binary Search Algorithm

O(log N)

17
New cards

Left Half of Array

Consists of A[0..M-1] in a binary search.

18
New cards

Right Half of Array

Consists of A[M+1..N-1] in a binary search.

19
New cards

Binary search method

Divide and conquer