Space/Time Trade-offs and Algorithms

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

These flashcards cover key concepts related to space/time trade-offs, different sorting algorithms, string matching techniques, and hashing strategies.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

Space/Time Trade-offs

The balance between the memory consumed by an algorithm (space) and the time taken to execute it (time), often requiring a sacrifice of one for the other.

2
New cards

Input enhancement

A preprocessing technique that stores data for later use to improve the efficiency of solving a problem.

3
New cards

Counting Sort

A sorting algorithm that counts the frequency of each element and organizes them based on these counts, with an efficiency of O(n^2).

4
New cards

Distribution Counting Sort

A special-purpose sorting algorithm efficient for small, known input value frequencies, with an efficiency of O(n).

5
New cards

String Matching

An algorithmic approach for finding occurrences of a pattern within a text, which can be enhanced to skip comparisons based on character occurrences.

6
New cards

Hash Function

A function that maps keys to indices in a hash table, often using operations like key mod m, where m is the table size.

7
New cards

Collisions in Hashing

Situations where two different keys are mapped to the same index in a hash table, requiring strategies like separate chaining or closed hashing.

8
New cards

Separate Chaining

A collision resolution strategy where each bucket in a hash table stores a list of entries assigned to that bucket.

9
New cards

Closed Hashing

A collision resolution strategy where, upon collision, the algorithm searches linearly for the next available bucket.

10
New cards

Efficiency of Hash Table

Insert, get, and delete operations in a hash table can generally be performed in O(1) time if the hash function is of good quality.