Explore detailed guides, code implementations, and complexity analysis for all supported data structures and algorithms.
Hierarchical structure with left-child smaller and right-child larger properties. Supports quick search and traversals.
Complete binary tree stored as an array. Guarantees instant access to the minimum or maximum element.
Sequential collection of elements in contiguous memory. Includes direct index access and sorting comparisons.
Linear collection of data elements where order is not given by physical memory, but by pointers connecting nodes.
Simple comparison sort that repeatedly steps through the list and swaps adjacent out-of-order elements.
Builds the sorted array one item at a time. Extremely fast for small or nearly-sorted datasets.
Divide-and-conquer algorithm using partitioning around a chosen pivot element.
Guaranteed O(n log n) divide-and-conquer algorithm that recursively splits and merges sorted sub-arrays.
Explores a graph level by level using a Queue. Perfect for finding the shortest path in unweighted graphs.
Dives as deep as possible into a graph branch before backtracking, using a Stack or recursion.
Finds the shortest path from a starting node to all other nodes in a graph with non-negative edge weights.
Greedy algorithm that finds a Minimum Spanning Tree (MST) by sorting edges and using Disjoint Sets (Union-Find).
Finds all Strongly Connected Components (SCCs) in a directed graph using two passes of Depth-First Search.
Determines if a graph can be colored using exactly two colors such that no adjacent nodes share the same color.
Identifies isolated clusters (subgraphs) within an undirected graph where any two vertices are connected by paths.
Finds if a graph contains any cycles (paths that loop back to a starting node) using DFS back-edges or Union-Find.
Assigns colors to the vertices of a graph such that no two adjacent vertices share the same color using a greedy approach.