Skip to content

This repository offers concise solutions to algorithmic problems from LeetCode, covering various topics like linked-lists, math, strings, and sorting algorithms. It serves as a valuable resource for programmers seeking efficient problem-solving strategies and insights.

Notifications You must be signed in to change notification settings

Muhammad-Taqi-Dev/DSA---LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

337 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ DSA & LeetCode Solutions

GitHub LeetCode Language PRs Welcome

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!


๐Ÿ“š Table of Contents


๐ŸŽฏ About

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

๐Ÿ“‚ Repository Structure

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!

๐Ÿ’ป Languages Supported


๐Ÿ”ฅ Problem Categories

๐Ÿ“Š Data Structures

  • Linear: Array, Linked List, Stack, Queue
  • Hierarchical: Binary Tree, Binary Search Tree, Trees
  • Hash-based: Hash Table, Hash Map
  • Advanced: Heap (Priority Queue), Matrix

๐Ÿงฎ Algorithms

  • 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

๐Ÿ—„๏ธ Database

  • SQL 50: Complete problem set with solutions
  • Advanced Queries: Joins, Aggregations, Subqueries
  • Database Design: Schema optimization and query performance

๐Ÿš€ Getting Started

Prerequisites

  • 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)

Installation

# 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++"

Running Solutions

C++ Example:

g++ -o solution problem_name.cpp
./solution

Python Example:

python3 problem_name.py

SQL Example:

-- Execute in your SQL client
SOURCE problem_name.sql;

๐Ÿงญ How to Navigate

  1. By Topic: Navigate to the specific algorithm or data structure folder
  2. By Language: Each category contains subfolders for different languages
  3. By Platform: Check HackerRank/ for HackerRank-specific solutions
  4. SQL Practice: Head to SQL 50/ for comprehensive SQL problems

Example Path:

Array/ โ†’ C++/ โ†’ [specific_problem.cpp]
Dynamic Programming/ โ†’ Python3/ โ†’ [specific_problem.py]
SQL 50/ โ†’ [specific_query.sql]

๐Ÿค Contributing

Contributions are highly encouraged! Whether it's:

  • ๐Ÿ› Bug fixes
  • โœจ New solutions
  • ๐Ÿ“ Documentation improvements
  • ๐ŸŒ Solutions in new languages

How to Contribute:

  1. Fork the repository
  2. Create a new branch
    git checkout -b feature/new-solution
  3. Add your solution in the appropriate directory
  4. Follow the naming convention: ProblemName.extension
  5. Commit your changes
    git commit -m "Add: [Problem Name] in [Language]"
  6. Push to your fork
    git push origin feature/new-solution
  7. Create a Pull Request

Contribution Guidelines:

  • Include problem number/name in comments
  • Add time and space complexity analysis
  • Write clean, readable code
  • Test your solution before submitting

๐Ÿ“– Resources

Learning Platforms

Useful Links


๐ŸŒŸ Connect

GitHub LeetCode

Found this helpful? Give it a โญ!


๐Ÿ“ˆ Keep Learning, Keep Growing!

"The only way to learn a new programming language is by writing programs in it." - Dennis Ritchie


Last Updated: February 2026

About

This repository offers concise solutions to algorithmic problems from LeetCode, covering various topics like linked-lists, math, strings, and sorting algorithms. It serves as a valuable resource for programmers seeking efficient problem-solving strategies and insights.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages