Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions in C++

Welcome to my repository of LeetCode problems solved in C++. This repository contains my personal solutions to various algorithmic challenges and problems from LeetCode.

Table of Contents

Introduction

This repository serves as a collection of my solutions to problems from LeetCode, a popular platform for coding interviews and competitive programming. Each solution is implemented in C++ and is organized by the problem's name or ID for easy navigation.

Structure

The repository is organized as follows:

leetcode-solutions/
├── README.md
├── arrays/
│   ├── two_sum.cpp
│   └── ...
├── linked_lists/
│   ├── reverse_linked_list.cpp
│   └── ...
├── trees/
│   ├── binary_tree_inorder_traversal.cpp
│   └── ...
├── dynamic_programming/
│   ├── longest_increasing_subsequence.cpp
│   └── ...
└── ... (other categories as needed)
  • Each directory contains solutions related to a specific topic or data structure.
  • Each file is named according to the problem it solves, with a brief description in the comments.

How to Use

To use or test any of the solutions:

  1. Clone the repository:

    git clone https://github.com/ilorde-exe/leetcode.git
    cd leetcode
  2. Navigate to the directory of interest:

    cd arrays
  3. Compile and run the C++ file:

    g++ two_sum.cpp -o two_sum
    ./two_sum

Feel free to modify the code or use it as a reference for your own solutions.

Contributing

Contributions are welcome! If you have a better solution or an alternative approach to any of the problems, please submit a pull request. Make sure your code follows the existing structure and includes comments explaining your solution.

To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix:
    git checkout -b feature-new-solution
  3. Commit your changes:
    git commit -am 'Add new solution for XYZ problem'
  4. Push to the branch:
    git push origin feature-new-solution
  5. Create a new pull request on GitHub.

License

This repository is licensed under the GNU License. See the LICENSE file for more information.


Happy coding!


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages