Skip to content

Explore C++ programs covering Data Structures and Algorithms in this comprehensive repository. Feel free to explore the code snippets and adapt them to your own projects. πŸš€πŸ”πŸ“š

License

Notifications You must be signed in to change notification settings

amangupta143/Data-Structures-and-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Data Structures and Algorithms [C++] ✨

Static Badge GitHub License GitHub Repo stars GitHub last commit Lines of code Number of files

Data Structures and Algorithms

Welcome to the C++ Data Structures and Algorithms repository! This comprehensive collection showcases various implementations of data structures and algorithms in C++. Whether you're preparing for coding interviews, learning computer science fundamentals, or seeking to strengthen your programming skills, this repository serves as a valuable resource. πŸš€

πŸ“š Table of Contents

🎯 Introduction

This repository contains carefully crafted implementations of fundamental data structures and algorithms, accompanied by detailed explanations and problem-solving approaches. Each implementation is designed to be both educational and practical, helping you build a strong foundation in computer science concepts.

πŸ“‚ Repository Structure

Data-Structures-and-Algorithms/
β”œβ”€β”€ GeeksForGeeks-Solutions/
β”‚   └── Question-Name/        # Example: Move All Zeroes to End
β”‚       β”œβ”€β”€ README.md         # Problem description and approach
β”‚       └── question-name.cpp # Solution implementation
β”œβ”€β”€ Leetcode-Solutions/
β”‚   └── Question-Name/        # Example: 0001-two-sum
β”‚       β”œβ”€β”€ README.md         # Problem description and approach
β”‚       └── question-name.cpp # Solution implementation
β”œβ”€β”€ LICENSE
└── README.md

Each solution includes:

  • Detailed problem description
  • Time and space complexity analysis
  • Solution approach explanation
  • Fully commented C++ implementation

πŸš€ Getting Started

  1. Clone the repository:

    git clone https://github.com/amangupta143/Data-Structures-and-Algorithms.git
  2. Navigate to any solution directory:

    cd Leetcode-Solutions/Question-Name
    # or
    cd GeeksForGeeks-Solutions/Question-Name
  3. Read the problem's README.md to understand the approach

  4. Compile and run the solution:

    g++ -std=c++17 -o solution question-name.cpp
    ./solution

πŸ’‘ LeetCode Solutions

Each LeetCode solution in the repository follows a consistent structure to help you understand the problem-solving process:

  • Problem statement and constraints
  • Multiple approaches (when applicable)
  • Time and space complexity analysis
  • Edge cases and test scenarios
  • Detailed code comments explaining the implementation

πŸŽ“ GeeksForGeeks Solutions

The GeeksForGeeks solutions section contains implementations of various problems from GeeksForGeeks, featuring:

  • Step-by-step problem explanations
  • Multiple solution approaches where applicable
  • Optimized implementations with detailed comments
  • Time and space complexity analysis
  • Test cases and edge case handling

πŸ›  Prerequisites

  • C++ compiler supporting C++17 or later
  • Basic understanding of data structures and algorithms
  • Git for version control
  • CMake (optional, for building complex examples)

πŸ“ Compilation Guide

For most solutions, a simple compilation command will suffice:

g++ -std=c++17 -Wall -Wextra -o solution question-name.cpp

For debugging, you can use:

g++ -std=c++17 -g -Wall -Wextra -o solution question-name.cpp

🀝 Contributing

Contributions are highly encouraged! Here's how you can contribute:

  1. Fork the repository
  2. Create a new branch for your feature: git checkout -b feature-name
  3. Implement your changes
  4. Add meaningful commit messages
  5. Push to your branch: git push origin feature-name
  6. Open a Pull Request

Please ensure your code follows these guidelines:

  • Clear and consistent formatting
  • Comprehensive comments
  • Problem approach explanation in README.md
  • Test cases included

πŸ“„ License

This project is licensed under the MIT License. Feel free to use the code for learning purposes and share it with others.

Happy Coding! πŸš€

Portfolio Github Linkedin

About

Explore C++ programs covering Data Structures and Algorithms in this comprehensive repository. Feel free to explore the code snippets and adapt them to your own projects. πŸš€πŸ”πŸ“š

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages