A comprehensive collection of data structures and algorithms implementations in multiple programming languages (Python, Java, and C++). This repository serves as both a learning resource and reference implementation for various computer science concepts.
- Binary Trees
- Binary Tree implementation
- BST from preorder traversal
- Count leaf nodes in binary tree
- Preorder traversal (iterative and recursive)
- Balanced Trees
- AVL Tree (with insertion and deletion)
- Red-Black Tree
- 2-3 Tree
- 2-3-4 Tree
- B+ Tree
- Heap Implementations
- Heapify implementation
- Heapq usage
- Singly Linked Lists
- Creation and display
- Insertion operations (at position, sorted)
- Palindrome check
- Remove duplicates
- Remove nth node from end
- Find middle of linked list
- Doubly Linked Lists
- Implementation
- Circular Linked Lists
- Implementation and operations
- Advanced Sorting
- Intro Sort
- Tim Sort
- Quickselect
- Graph Algorithms
- Topological Sort
- Stacks
- Implementation
- Balanced parenthesis checker
- Priority Queues
- Implementation
- Recursion
- Factorial calculation
- Decimal to binary conversion
- Print n to 1
- Greedy Algorithms
- Coin change problem
- Data Compression
- Huffman coding
- Matrix interchange
- Matrix rotation
- Dynamic array as parameter (C++)
- Structures in C++
- HashSet and HashMap usage
- Array operations
- Python: Primary language for most implementations
- Java: Several implementations, especially for fundamental data structures
- C++: Used for some lower-level implementations
- Clone this repository
- Navigate to the implementation you're interested in
- Each file is self-contained and can be run independently
The implementations can be used for:
- Learning data structures and algorithms
- Preparing for coding interviews
- Reference for implementing these concepts in your own projects
- Understanding the time and space complexity of different approaches
This repository contains implementations created for educational purposes.
Contributions are welcome! Feel free to add new implementations, improve existing ones, or fix bugs.