A comprehensive collection of Data Structures & Algorithms solutions from LeetCode, HackerRank, and SQL challenges.
Master problem-solving skills and ace technical interviews with multi-language implementations!
- About
- Repository Structure
- Languages Supported
- Problem Categories
- Getting Started
- How to Navigate
- Contributing
- Resources
- Connect
This repository is a comprehensive archive of solutions to competitive programming problems, featuring:
- โ Multiple Language Support: C++, Python3, C, C#, SQL, and JavaScript
- โ Well-Organized: Categorized by data structures and algorithms
- โ Interview Preparation: Perfect for coding interviews and technical assessments
- โ SQL Mastery: Complete SQL 50 problem set with detailed solutions
- โ Active Development: Regularly updated with new solutions
DSA---LeetCode/
โ
โโโ ๐ 30 Days of JavaScript/ # JavaScript Challenge Solutions
โ
โโโ ๐ Array/ # Array problems (C, C++, C#, Python3)
โโโ ๐ Linked List/ # Linked List implementations
โโโ ๐ Stack/ # Stack problems
โโโ ๐ Queue/ # Queue problems
โโโ ๐ Binary Tree/ # Binary Tree solutions
โโโ ๐ Binary Search Tree/ # BST problems
โโโ ๐ Binary Search/ # Binary Search algorithms
โ
โโโ ๐ Hash Table/ # Hash Table/Map problems
โโโ ๐ Heap(Priority Queue)/ # Heap data structure
โโโ ๐ Graphs/ # Graph algorithms
โโโ ๐ Trees/ # General tree problems
โ
โโโ ๐ Dynamic Programming/ # DP solutions (C, C++, Python3)
โโโ ๐ Greedy/ # Greedy algorithms
โโโ ๐ Divide and Conquer/ # D&C techniques
โโโ ๐ BackTracking/ # Backtracking problems
โโโ ๐ Recursion/ # Recursive solutions
โโโ ๐ Memoization/ # Memoization techniques
โ
โโโ ๐ Breadth-First-Search(BFS)/ # BFS algorithms
โโโ ๐ Depth-First-Search(DFS)/ # DFS algorithms
โ
โโโ ๐ Two Pointers/ # Two pointer technique
โโโ ๐ Sliding Window/ # Sliding window problems
โโโ ๐ Prefix Sum/ # Prefix sum technique
โโโ ๐ Sorting/ # Sorting algorithms
โโโ ๐ Counting/ # Counting techniques
โโโ ๐ Bit Manipulation/ # Bitwise operations
โ
โโโ ๐ Maths -- Geometry/ # Mathematical problems
โโโ ๐ Matrix/ # 2D array problems
โโโ ๐ Strings/ # String manipulation
โ
โโโ ๐ SQL 50/ # Complete SQL 50 challenge
โโโ ๐ Database/ # Additional SQL problems
โ
โโโ ๐ HackerRank/ # HackerRank solutions (C++)
โ
โโโ ๐ README.md # You are here!
- Linear: Array, Linked List, Stack, Queue
- Hierarchical: Binary Tree, Binary Search Tree, Trees
- Hash-based: Hash Table, Hash Map
- Advanced: Heap (Priority Queue), Matrix
- Search: Binary Search, BFS, DFS
- Optimization: Dynamic Programming, Greedy, Divide and Conquer
- Traversal: Backtracking, Recursion
- Techniques: Two Pointers, Sliding Window, Prefix Sum
- Fundamentals: Sorting, Counting, Bit Manipulation
- Graph: Graph traversal and algorithms
- SQL 50: Complete problem set with solutions
- Advanced Queries: Joins, Aggregations, Subqueries
- Database Design: Schema optimization and query performance
- C++: GCC/G++ compiler or Visual Studio
- Python: Python 3.x
- SQL: MySQL, PostgreSQL, or any SQL database
- JavaScript: Node.js (for 30 Days of JavaScript)
# Clone the repository
git clone https://github.com/Muhammad-Taqi-Dev/DSA---LeetCode.git
# Navigate to the directory
cd DSA---LeetCode
# Browse solutions by category
cd "Array/C++"C++ Example:
g++ -o solution problem_name.cpp
./solutionPython Example:
python3 problem_name.pySQL Example:
-- Execute in your SQL client
SOURCE problem_name.sql;- By Topic: Navigate to the specific algorithm or data structure folder
- By Language: Each category contains subfolders for different languages
- By Platform: Check
HackerRank/for HackerRank-specific solutions - SQL Practice: Head to
SQL 50/for comprehensive SQL problems
Array/ โ C++/ โ [specific_problem.cpp]
Dynamic Programming/ โ Python3/ โ [specific_problem.py]
SQL 50/ โ [specific_query.sql]
Contributions are highly encouraged! Whether it's:
- ๐ Bug fixes
- โจ New solutions
- ๐ Documentation improvements
- ๐ Solutions in new languages
- Fork the repository
- Create a new branch
git checkout -b feature/new-solution
- Add your solution in the appropriate directory
- Follow the naming convention:
ProblemName.extension - Commit your changes
git commit -m "Add: [Problem Name] in [Language]" - Push to your fork
git push origin feature/new-solution
- Create a Pull Request
- Include problem number/name in comments
- Add time and space complexity analysis
- Write clean, readable code
- Test your solution before submitting
- LeetCode - Practice coding problems
- HackerRank - Coding challenges
- GeeksforGeeks - DSA tutorials
- Big-O Cheat Sheet
- Visualgo - Algorithm visualizations
- CP-Algorithms - Competitive programming algorithms