Skip to content

Collection of LeetCode & Data Structures and Algorithms solutions in C++ for placement preparation. Includes well-commented code, problem links, and categorized questions for quick revision. Covers arrays, strings, linked lists, trees, graphs, DP, and more.

License

Notifications You must be signed in to change notification settings

Harshul-Negi/Leetcode-Solutions-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode DSA in C++

Language Platform Last Updated License: MIT

A collection of my solutions to LeetCode problems, written in C++, focused on mastering Data Structures and Algorithms for placement preparation.


📊 My LeetCode Stats

LeetCode Stats


📌 About This Repository

This repository contains:

  • My personal solutions to LeetCode problems
  • Categorization by topic and difficulty
  • Well-commented C++ code
  • Notes and thought process for tricky problems

📂 Folder Structure

LeetCode-DSA-Cpp/
│
├── Arrays/
│   ├── TwoSum.cpp
│   ├── MaximumSubarray.cpp
│
├── Strings/
│   ├── LongestSubstring.cpp
│
├── LinkedList/
│   ├── ReverseLinkedList.cpp
│
├── DynamicProgramming/
│   ├── LongestIncreasingSubsequence.cpp
│
└── README.md

🛠 How to Run

1. Clone the repository

git clone https://github.com/your-username/LeetCode-DSA-Cpp.git
cd LeetCode-DSA-Cpp

2. Compile and run a solution

g++ Arrays/TwoSum.cpp -o TwoSum
./TwoSum

🧠 Topics Covered

  • Arrays
  • Strings
  • Linked List
  • Stacks & Queues
  • Trees & Graphs
  • Recursion & Backtracking
  • Dynamic Programming
  • Greedy Algorithms
  • Binary Search
  • Hashing

🎯 Goals

  • Strengthen problem-solving skills
  • Prepare for SDE interviews & placements
  • Build a reusable DSA notes + solutions bank

💡 Important LeetCode Questions for Placements

Here’s a list of must-do problems for placements:

  • Arrays: Two Sum, Maximum Subarray, Merge Intervals
  • Strings: Longest Substring Without Repeating Characters, Anagram Check
  • Linked List: Reverse Linked List, Detect Cycle
  • Trees: Binary Tree Level Order Traversal, Lowest Common Ancestor
  • Dynamic Programming: Longest Increasing Subsequence, Coin Change
  • Graphs: Number of Islands, Detect Cycle in Graph

📜 License

This repository is licensed under the MIT License — you’re free to use, modify, and share the code with attribution.


🤝 Contribution

If you have optimized solutions, feel free to fork this repo and create a pull request.

About

Collection of LeetCode & Data Structures and Algorithms solutions in C++ for placement preparation. Includes well-commented code, problem links, and categorized questions for quick revision. Covers arrays, strings, linked lists, trees, graphs, DP, and more.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages