Choose Your Implementation

Browse through 51+ Data Structures and Algorithms implementations. Filter by category, or search for specific topics.

Filters
Showing 51 of 51 implementations
Implementation
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Singly Linked List Implementation
Linked List

A linear data structure where elements are stored in nodes, each pointing to the next node. Provides O(1) insertion/deletion at head, O(n) for search and access. Space complexity: O(n). Ideal for dynamic lists where size changes frequently.

3 languages
Implementation
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Doubly Linked List Implementation
Linked List

A linear data structure with nodes containing data and pointers to both next and previous nodes. Allows bidirectional traversal. Time complexity: O(1) for insertion/deletion at known positions, O(n) for search. Space complexity: O(n) with extra memory for prev pointers.

3 languages
Implementation
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Stack Implementation
Stack

A LIFO (Last In, First Out) data structure. Push, pop, and peek operations are O(1). Space complexity: O(n). Essential for expression evaluation, backtracking, and function call management.

3 languages
Implementation
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Queue Implementation
Queue

A FIFO (First In, First Out) data structure. Enqueue and dequeue operations are O(1) with deque implementation. Space complexity: O(n). Essential for BFS traversals, process scheduling, and handling requests in order.

3 languages
Implementation
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Binary Tree Implementation
Tree

A hierarchical data structure where each node has at most two children. Tree traversals are O(n), search/insert/delete are O(h) where h is height. Space complexity: O(n). Foundation for BSTs, heaps, and expression trees.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Binary Search Tree Implementation
Tree

A binary tree where left subtree contains smaller values and right subtree contains larger values. Average case operations are O(log n), worst case O(n). Space complexity: O(n). Efficient for searching, sorting, and range queries.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Min Heap Implementation
Heap

A complete binary tree where parent nodes are smaller than children. Insert, delete, and extract-min are O(log n). Space complexity: O(n). Essential for priority queues, heap sort, and graph algorithms like Dijkstra's.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Graph Algorithms (BFS & DFS)
Graph

Fundamental graph traversal algorithms. BFS finds shortest path in unweighted graphs, DFS explores deeply. Both have O(V + E) time complexity. Space complexity: O(V). Essential for connectivity, pathfinding, and topological sorting.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Dynamic Programming Algorithms
Dynamic Programming

Optimization technique solving complex problems by breaking them into simpler subproblems. Includes memoization and tabulation approaches. Time complexity varies by problem. Essential for optimization problems like knapsack, LCS, and path counting.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Array Algorithms
Array

Essential array operations including sorting (quicksort, mergesort), searching (binary search), and manipulation. Time complexities range from O(n) to O(n log n). Space complexity varies. Fundamental for most algorithmic problems.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
String Algorithms
String

String processing algorithms including pattern matching (KMP), palindrome detection, and manipulation. Time complexity ranges from O(n) to O(n + m). Essential for text processing, DNA sequencing, and search engines.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
LRU Cache Implementation
Cache

Least Recently Used (LRU) cache using doubly linked list and hash map. Get and put operations are O(1). Space complexity: O(capacity). Essential for memory management and caching systems.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Trie (Prefix Tree) Implementation
Tree

Tree-like data structure for storing strings efficiently. Insert, search, and prefix operations are O(m) where m is string length. Space complexity: O(ALPHABET_SIZE * N * M). Perfect for autocomplete and spell checkers.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Union-Find (Disjoint Set) Implementation
Graph

Data structure for tracking disjoint sets with union and find operations. With path compression and union by rank, operations are nearly O(1) amortized. Essential for detecting cycles and connected components.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Segment Tree Implementation
Tree

Tree data structure for range queries and updates. Range queries and updates are O(log n). Space complexity: O(n). Excellent for range sum, min/max queries with updates.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Bloom Filter Implementation
Probabilistic

Probabilistic data structure for membership testing. Space-efficient with possible false positives but no false negatives. Insert and lookup are O(k) where k is number of hash functions. Great for caching and databases.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Fenwick Tree (Binary Indexed Tree)
Tree

Tree data structure for efficient prefix sum queries and updates. Both operations are O(log n). Space complexity: O(n). More space-efficient than segment trees for prefix sum queries.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Suffix Array and LCP Implementation
String

Suffix array provides sorted order of all suffixes. Construction is O(n log n), pattern search is O(m log n). LCP array gives longest common prefix between adjacent suffixes. Essential for string algorithms.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Max Heap Implementation
Heap

A complete binary tree where parent nodes are larger than children. Insert, delete, and extract-max are O(log n). Space complexity: O(n). Used in priority queues, heap sort, and finding largest elements.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
AVL Tree Implementation
Tree

Self-balancing binary search tree with height-balanced property. All operations are O(log n) guaranteed. Space complexity: O(n). More rigidly balanced than red-black trees.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Red-Black Tree Implementation
Tree

Self-balancing binary search tree with color properties. All operations are O(log n) amortized. Space complexity: O(n). Used in many standard library implementations.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
B-Tree Implementation
Tree

Self-balancing tree data structure for sorted data with multiple keys per node. All operations are O(log n). Space complexity: O(n). Essential for databases and file systems.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Hash Table Implementation
Hash Table

Data structure for key-value pairs using hash functions. Average case O(1) for insert, delete, lookup. Space complexity: O(n). Handles collisions with chaining or open addressing.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Deque (Double-ended Queue) Implementation
Queue

Linear data structure supporting insertion and deletion at both ends. All operations are O(1). Space complexity: O(n). Useful for sliding window problems and palindrome checking.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Priority Queue Implementation
Heap

Abstract data type with priority-based access. Insert is O(log n), extract-min/max is O(log n). Space complexity: O(n). Essential for Dijkstra's algorithm and task scheduling.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Circular Linked List Implementation
Linked List

Linked list where the last node points back to the first. Allows continuous traversal. Operations are O(1) for insertion/deletion at known positions, O(n) for search.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Skip List Implementation
Linked List

Probabilistic data structure with multiple levels for fast search. Average operations are O(log n). Space complexity: O(n). Alternative to balanced trees with simpler implementation.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Dijkstra's Shortest Path Algorithm
Graph

Graph algorithm for finding shortest path from source to all vertices. Time complexity: O(Vยฒ or (V + E) log V) with priority queue. Essential for GPS systems and network routing.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Bellman-Ford Algorithm
Graph

Graph algorithm for shortest path that handles negative weights. Time complexity: O(VE). Space complexity: O(V). Can detect negative cycles unlike Dijkstra's algorithm.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Floyd-Warshall Algorithm
Graph

Dynamic programming algorithm for all-pairs shortest paths. Time complexity: O(Vยณ). Space complexity: O(Vยฒ). Works with negative weights and detects negative cycles.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Topological Sort Implementation
Graph

Linear ordering of vertices in a directed acyclic graph. Time complexity: O(V + E). Space complexity: O(V). Essential for dependency resolution and task scheduling.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Kruskal's Minimum Spanning Tree
Graph

Greedy algorithm for finding minimum spanning tree. Time complexity: O(E log E). Uses union-find data structure. Essential for network design and clustering.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Prim's Minimum Spanning Tree
Graph

Greedy algorithm for minimum spanning tree starting from a vertex. Time complexity: O(Vยฒ or E log V). Space complexity: O(V). Alternative to Kruskal's algorithm.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Binary Search Implementation
Array

Efficient search algorithm for sorted arrays. Time complexity: O(log n). Space complexity: O(1) iterative, O(log n) recursive. Foundation for many divide-and-conquer algorithms.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Merge Sort Implementation
Sorting

Divide-and-conquer sorting algorithm. Time complexity: O(n log n) guaranteed. Space complexity: O(n). Stable sort, good for linked lists and external sorting.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Quick Sort Implementation
Sorting

Divide-and-conquer sorting algorithm. Average case: O(n log n), worst case: O(nยฒ). Space complexity: O(log n) average. In-place sorting, widely used in practice.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Heap Sort Implementation
Sorting

Comparison-based sorting using binary heap. Time complexity: O(n log n) guaranteed. Space complexity: O(1). In-place sorting with consistent performance.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Radix Sort Implementation
Sorting

Non-comparison sorting algorithm for integers. Time complexity: O(d ร— n) where d is digits. Space complexity: O(n + k). Efficient for fixed-width integer keys.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Counting Sort Implementation
Sorting

Non-comparison sorting for integers in known range. Time complexity: O(n + k) where k is range. Space complexity: O(k). Stable sort, efficient for small ranges.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
KMP String Matching Algorithm
String

Efficient pattern matching algorithm. Time complexity: O(n + m). Space complexity: O(m). Uses failure function to avoid redundant comparisons.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Rabin-Karp String Matching
String

String matching using rolling hash. Average case: O(n + m), worst case: O(nm). Good for multiple pattern matching and plagiarism detection.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Manacher's Palindrome Algorithm
String

Linear time algorithm for finding all palindromes in a string. Time complexity: O(n). Space complexity: O(n). Efficiently handles both odd and even length palindromes.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Edit Distance (Levenshtein Distance)
Dynamic Programming

Dynamic programming algorithm for minimum edit distance between strings. Time complexity: O(mn). Space complexity: O(mn) or O(min(m,n)). Used in spell checkers and DNA analysis.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Longest Common Subsequence (LCS)
Dynamic Programming

Dynamic programming algorithm for finding LCS of two sequences. Time complexity: O(mn). Space complexity: O(mn) or O(min(m,n)). Used in diff tools and bioinformatics.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
0/1 Knapsack Problem
Dynamic Programming

Classic dynamic programming problem for optimal selection. Time complexity: O(nW). Space complexity: O(nW) or O(W). Models resource allocation and optimization problems.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Coin Change Problem
Dynamic Programming

Dynamic programming for minimum coins needed for target amount. Time complexity: O(n ร— amount). Space complexity: O(amount). Classic example of optimal substructure.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Matrix Chain Multiplication
Dynamic Programming

Dynamic programming for optimal matrix multiplication order. Time complexity: O(nยณ). Space complexity: O(nยฒ). Minimizes scalar multiplications in matrix chain.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Kadane's Algorithm (Maximum Subarray)
Dynamic Programming

Dynamic programming for maximum sum contiguous subarray. Time complexity: O(n). Space complexity: O(1). Elegant solution to maximum subarray problem.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Two Pointers Technique
Array

Algorithmic technique using two pointers for array/string problems. Time complexity varies, often O(n). Space complexity: O(1). Useful for pairs, palindromes, and sorted arrays.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Sliding Window Technique
Array

Technique for problems involving contiguous subarrays/substrings. Time complexity: O(n). Space complexity: O(1) or O(k). Efficient for maximum/minimum in windows.

3 languages
Implementation
Premium
๐Ÿ Py
โšก C++
๐Ÿ”ท Go
Backtracking Algorithm Examples
Recursion

Systematic search through solution space with pruning. Time complexity varies, often exponential. Includes N-Queens, Sudoku solver, and subset generation.

3 languages
51
Total Implementations
14
Categories
3
Languages