Core Vocabulary

Beginner Concepts

The foundation layer before algorithm drills: how data is structured, which operations are cheap, patterns you will see first, and pitfalls that cause wrong answers.

7
Groups
32
Concepts
32
Deep Dives
Showing 32 of 32 concepts
Algorithms
Foundations Start here

Data Structure vs Algorithm

A data structure is the shape you choose for storing data, while an algorithm is the recipe that works on that data.

2 more details available

Complexity Shape: Depends on chosen structure and algorithm
Foundations Start here

Big O Notation

Big O is a vocabulary for describing how work grows as the input gets larger.

2 more details available

Complexity Shape: A language for describing complexity
Foundations Start here

Memory, References, and Pointers

Programs store values somewhere in memory. A reference is a handle that lets one part of your program reach an object stored elsewhere.

2 more details available

Complexity Shape: Memory layout changes access cost
Linear Data Structures Core

Arrays

An array keeps values in order and lets you jump to a position by index.

2 more details available

Complexity Shape: Read O(1), search O(n), insert/delete middle O(n)
Linear Data Structures Core

Strings

A string is a sequence of characters, often treated like an array with extra immutability rules.

Complexity Shape: Scan O(n), concatenate often O(n)
Linear Data Structures Core

Matrices and Grids

A matrix is a two-dimensional array, commonly used for grids, maps, tables, and DP states.

Complexity Shape: Full scan O(R*C)
Linear Data Structures Core

Linked Lists

A linked list stores each value inside a node, and each node points to the next node in the chain.

2 more details available

Complexity Shape: Access/search O(n), insert/delete with node O(1)
Linear Data Structures Core

Stacks

A stack keeps the newest item at the top, and only the top is meant to be removed next.

2 more details available

Complexity Shape: Core operations O(1)
Linear Data Structures Core

Queues

A queue keeps items in arrival order: add at the back, remove from the front.

2 more details available

Complexity Shape: Core operations O(1)
Linear Data Structures Core

Deque

A deque supports adding and removing from both ends.

Complexity Shape: Core operations O(1)
Hashing Core

Hash Maps

A hash map stores key-value pairs and gives fast average lookup by key.

Complexity Shape: Average O(1), worst O(n)
Hashing Core

Hash Sets

A hash set stores unique values and gives fast membership checks.

Complexity Shape: Average O(1), worst O(n)
Hashing Practice pattern

Frequency Counting

Count how many times values or characters appear, usually with a map or fixed-size array.

Complexity Shape: Usually O(n) time and O(k) space
Patterns Practice pattern

Two Pointer Pattern

Use two indexes to scan from different positions without nested loops.

Complexity Shape: Usually O(n)
Patterns Practice pattern

Sliding Window Pattern

Maintain a window over a sequence and update state as the window moves.

Complexity Shape: Usually O(n)
Patterns Practice pattern

Prefix Sums

Store cumulative totals so range queries can be answered quickly.

Complexity Shape: Build O(n), query O(1)
Problem Solving Core

Recursion Basics

A recursive function solves a problem by calling itself on a smaller problem.

Complexity Shape: Depends on branching and depth
Problem Solving Core

Sorting Basics

Sorting arranges data into order, often making search and greedy decisions easier.

Complexity Shape: Usually O(n log n), simple sorts O(n^2)
Problem Solving Core

Searching Basics

Searching finds a target value or position in a collection.

Complexity Shape: Linear O(n), binary O(log n)
Trees Core

Trees

A tree is a hierarchical structure with nodes connected by parent-child relationships.

Complexity Shape: Traversal O(n), balanced search O(log n)
Trees Core

Binary Trees

A binary tree is a tree where each node has at most two children.

Complexity Shape: Traversal O(n)
Trees Core

Binary Search Trees

A BST keeps smaller values on the left and larger values on the right.

Complexity Shape: O(h), balanced O(log n), worst O(n)
Trees Core

Heaps and Priority Queues

A heap keeps the highest or lowest priority item at the top.

Complexity Shape: Push/pop O(log n), peek O(1)
Trees Core

Tries

A trie stores words by sharing prefixes through character nodes.

Complexity Shape: O(word length)
Graphs Core

Graphs

A graph represents things as nodes and relationships as edges.

2 more details available

Complexity Shape: Traversal O(V + E)
Graphs Core

Graph Representation

Graphs are commonly represented with adjacency lists, adjacency matrices, or edge lists.

Complexity Shape: Depends on representation
Graphs Practice pattern

BFS Concept

Breadth-first search explores nodes by distance from the start using a queue.

Complexity Shape: O(V + E)
Graphs Practice pattern

DFS Concept

Depth-first search explores one path deeply before backtracking.

Complexity Shape: O(V + E)
Problem Solving Practice pattern

Greedy Thinking

A greedy algorithm makes the locally best choice and commits to it.

Complexity Shape: Often O(n log n) due to sorting
Problem Solving Practice pattern

Dynamic Programming Thinking

Dynamic programming is useful when the same smaller questions appear again and again.

2 more details available

Complexity Shape: Number of states times transition cost
Problem Solving Practice pattern

Backtracking Thinking

Backtracking explores choices, abandons invalid paths, and undoes choices when returning.

Complexity Shape: Often exponential
Problem Solving Core

Bit Manipulation Basics

Bit manipulation uses binary representation directly for masks, flags, and fast arithmetic tricks.

Complexity Shape: Usually O(1) per operation