Skip to content
Data Structures & Algorithms Glossary

Data Structures & Algorithms Glossary

Big O notation, BFS, DFS, hash tables, dynamic programming, recursion — core DSA concepts every programmer should know.

Pages in this section

Big O Notation — Explained with Examples

Big O notation describes algorithm efficiency by expressing how runtime or memory usage grows relative to input size, independent of hardware.

✓ Live

BFS — Explained with Examples

BFS (Breadth-First Search) is a graph traversal algorithm that explores all neighbors at the current depth before moving to the next level.

✓ Live

DFS — Explained with Examples

DFS (Depth-First Search) is a graph traversal algorithm that explores as far as possible along each branch before backtracking.

✓ Live

Hash Table — Explained with Examples

A hash table is a key-value data structure using a hash function to compute indices, enabling O(1) average-time insertions, deletions, and lookups.

✓ Live

Dynamic Programming — Explained with Examples

Dynamic programming solves complex problems by breaking them into overlapping subproblems, storing results to avoid redundant computation.

✓ Live

Recursion — Explained with Examples

Recursion is a technique where a function calls itself to solve smaller instances of the same problem until reaching a base case.

✓ Live

Divide and Conquer — Explained with Examples

Divide and conquer recursively splits a problem into independent subproblems, solves each, and combines results into the final solution.

✓ Live

Greedy Algorithm — Explained with Examples

A greedy algorithm makes the locally optimal choice at each step, hoping to find a global optimum without revisiting decisions.

✓ Live

Binary Tree — Explained with Examples

A binary tree is a hierarchical data structure where each node has at most two children, enabling efficient searching, sorting, and traversal.

✓ Live

BST — Explained with Examples

A Binary Search Tree (BST) is a binary tree where each node's left subtree contains smaller values and the right subtree larger values.

✓ Live

Heap — Explained with Examples

A heap is a tree-based data structure satisfying the heap property, used to implement priority queues with efficient min/max extraction.

✓ Live

Graph — Explained with Examples

A graph is a data structure of nodes (vertices) connected by edges, modeling relationships and networks across domains.

✓ Live

Linked List — Explained with Examples

A linked list is a linear data structure where nodes point to the next node, enabling O(1) insertions/deletions but O(n) access time.

✓ Live

Stack — Explained with Examples

A stack is a LIFO (Last-In-First-Out) data structure where elements are added and removed from the top, like a stack of plates.

✓ Live

Queue — Explained with Examples

A queue is a FIFO (First-In-First-Out) data structure where elements are added at the rear and removed from the front, like a waiting line.

✓ Live

Sorting Algorithms — Explained with Examples

Sorting algorithms arrange data in order, with tradeoffs in time complexity, space usage, stability, and adaptability to input patterns.

✓ Live

Two Pointers — Explained with Examples

The two pointers technique uses two pointers to traverse data structure elements, often reducing time complexity from O(n²) to O(n).

✓ Live

Sliding Window — Explained with Examples

Sliding window maintains a subarray subset of data using two pointers, optimizing problems involving contiguous sequences from O(n²) to O(n).

✓ Live

Trie — Explained with Examples

A trie (prefix tree) is a tree data structure for storing strings, enabling efficient prefix-based searches like autocomplete and spell checking.

✓ Live

Backtracking — Explained with Examples

Backtracking incrementally builds candidates and abandons them when they cannot lead to a valid solution, pruning the search space.

✓ Live