Educational Cards

Learn from video content, text, and interactive tasks

Filters
Clear
Directed vs Undirected Graphs

Undirected edges are symmetric; directed edges have direction. In the adjacency list of an...

Beginner Algorithms and Data Structures
Left and right rotations

A right rotation around node y with left child x makes x the new root of the subtree and y the...

Intermediate Algorithms and Data Structures
Complexity of Balanced Trees

Balanced search trees keep the height small enough that search, insertion, and deletion remain...

Intermediate Algorithms and Data Structures
B-Trees Overview

B-trees store multiple keys per node and keep leaves at the same depth. They are designed for...

Beginner Algorithms and Data Structures
AVL Idea: Balance Factor

An AVL tree is a binary search tree in which the heights of the child subtrees differ by at most 1....

Intermediate Algorithms and Data Structures
Insert with Rebalance

Insertion follows the search path as in a BST, attaching the node as a leaf and moving back up. At...

Intermediate Algorithms and Data Structures
TreeMap vs HashMap

A sorted map in Java is based on a Red-Black Tree (balanced BST): ordered keys, O(log n) per...

Beginner Algorithms and Data Structures
Crossings: pre in post

Three depth traversal orders are common. One starts at the node and then visits the left and right...

Beginner Algorithms and Data Structures
Iterator for Trees

A tree iterator encapsulates the current position (often with an explicit stack for inorder). This...

Beginner Algorithms and Data Structures
Height and complete trees

The height of a tree is the length of the longest path from the root to a leaf (conventions vary by...

Intermediate Algorithms and Data Structures
Recursive Tree Search

Searching in a binary tree: compare the key with the current node and descend left or right....

Intermediate Algorithms and Data Structures
Binary Tree: Nodes and Structure

A binary tree consists of nodes with at most two children (left, right). The root has no parent...

Beginner Algorithms and Data Structures