Data Structures

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

1/15

flashcard set

Earn XP

Description and Tags

DSA

Last updated 3:46 PM on 3/20/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards

Array

  • Access: O(1)

  • Insert/delete: O(n)

  • Space: O(n)

  • Contiguous memory

  • Best for: fast indexing

  • Bad for: resizing / inserting in middle

2
New cards

Dynamic Array

  • Access: O(1)

  • Append: O(1) amortized

  • Insert/delete: O(n)

  • Resizes by doubling

  • Best for: flexible arrays

  • Key idea: amortized cost

3
New cards

Linked List

  • Insert/delete: O(1)

  • Search: O(n)

  • No random access

  • Best for: frequent insert/delete

  • Worst for: searching

4
New cards

Stack / Queue / Deque

  • Push/pop: O(1)

  • Search: O(n)

  • Stack = LIFO

  • Queue = FIFO

  • Deque = both ends

  • Used in: DFS (stack), BFS (queue)

5
New cards

Binary Search Tree (BST)

Back:

  • Search/insert/delete: O(n) worst

  • Sorted structure

  • Left < root < right

  • Can become skewed (linked list)

  • Used for: ordered data

6
New cards

Balanced BST (AVL / Red-Black)

  • Operations: O(log n)

  • Self-balancing

  • AVL = stricter balance

  • RB = used in Java/Linux

  • Used when: need sorted + fast ops

7
New cards

Heap / Priority Queue

  • Insert: O(log n)

  • Remove min/max: O(log n)

  • Peek: O(1)

  • NOT sorted

  • Used in: Dijkstra

  • Key idea: parent ≤ children (min heap)

8
New cards

Hash Table

  • Insert/search/delete: O(1) expected

  • Worst: O(n) (collisions)

  • Uses hashing + buckets

  • No ordering

  • Best for: fast lookup by key

  • Collision handling:

    • chaining

    • open addressing

9
New cards

Adjacency List

  • Space: O(n + m)

  • Good for sparse graphs

  • Used in:

    • DFS

    • BFS

    • Dijkstra

  • Stores neighbors

10
New cards

Adjacency Matrix

  • Space: O(n²)

  • Fast edge lookup: O(1)

  • Bad for sparse graphs

  • Good for dense graphs

11
New cards

Union-Find (Disjoint Set)

  • Find/union: O(α(n)) ≈ O(1)

  • Tracks connected components

  • Used in: Kruskal

  • Prevents cycles

  • Structure = parent array

12
New cards

Skip List

  • Search/insert/delete: O(log n) expected

  • Randomized

  • Sorted structure

  • Alternative to BST

13
New cards

Bloom Filter

  • Insert/lookup: O(1)

  • Space: very compact

  • No deletion

  • False positives possible

  • No false negatives

  • Used for: membership check

14
New cards

Cuckoo Filter

  • Insert/lookup/delete: O(1) expected

  • Supports deletion (unlike Bloom)

  • False positives possible

  • Used for: fast membership w/ deletion

15
New cards

B-Tree

  • Operations: O(log n)

  • Disk-based structure

  • Used in databases

  • Multi-way tree

16
New cards

LSM Tree

  • Write: O(1) (append)

  • Read: O(log n)

  • Optimized for disk + heavy writes

  • Used in:

    • databases

    • versioned systems

Explore top notes

note
Financial Decision Making
Updated 615d ago
0.0(0)
note
APUSH Unit 5 Notes
Updated 466d ago
0.0(0)
note
MI Unit 3:
Updated 332d ago
0.0(0)
note
Properties of Water
Updated 1218d ago
0.0(0)
note
AP Euro Pages 477-492
Updated 1226d ago
0.0(0)
note
Financial Decision Making
Updated 615d ago
0.0(0)
note
APUSH Unit 5 Notes
Updated 466d ago
0.0(0)
note
MI Unit 3:
Updated 332d ago
0.0(0)
note
Properties of Water
Updated 1218d ago
0.0(0)
note
AP Euro Pages 477-492
Updated 1226d ago
0.0(0)

Explore top flashcards

flashcards
Modern Biology Genetics
36
Updated 1100d ago
0.0(0)
flashcards
Quiz Industrial Revolution
26
Updated 1039d ago
0.0(0)
flashcards
AP Econ unit 3 (mods 19-21)
21
Updated 857d ago
0.0(0)
flashcards
C1 Voc A
64
Updated 279d ago
0.0(0)
flashcards
Test: The Cold War - Final Exam
80
Updated 305d ago
0.0(0)
flashcards
NCCT Medical Terminology
300
Updated 493d ago
0.0(0)
flashcards
complete denture 2 final
62
Updated 102d ago
0.0(0)
flashcards
第十三课
49
Updated 922d ago
0.0(0)
flashcards
Modern Biology Genetics
36
Updated 1100d ago
0.0(0)
flashcards
Quiz Industrial Revolution
26
Updated 1039d ago
0.0(0)
flashcards
AP Econ unit 3 (mods 19-21)
21
Updated 857d ago
0.0(0)
flashcards
C1 Voc A
64
Updated 279d ago
0.0(0)
flashcards
Test: The Cold War - Final Exam
80
Updated 305d ago
0.0(0)
flashcards
NCCT Medical Terminology
300
Updated 493d ago
0.0(0)
flashcards
complete denture 2 final
62
Updated 102d ago
0.0(0)
flashcards
第十三课
49
Updated 922d ago
0.0(0)