Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mohdfaizu/leetcode-problems

This repo provides solutions for leetcode problems in python
https://github.com/mohdfaizu/leetcode-problems

leetcode python

Last synced: 26 days ago
JSON representation

This repo provides solutions for leetcode problems in python

Awesome Lists containing this project

README

        

# LeetCode Problems

Welcome to the LeetCode Problems repository! This repository contains solutions in python to various problems from LeetCode. Whether you're preparing for coding interviews, brushing up on your algorithm skills, or just enjoying solving problems, you'll find a collection of solutions here to help you out.

## Table of Contents

- [Problems Covered](#problems-covered)
- [Solution Formats](#solution-formats)
- [How to Contribute](#how-to-contribute)
- [License](#license)

## Problems Covered

This repository includes solutions to a variety of problems from LeetCode, including but not limited to:
- Two Sum
- Concatenation of Array
- Remove Duplicates
- Remove Elements
- Contains Duplicates

For a complete list of problems and solutions, please check the [Problems List](Problem%20List.md) file.

## Solution Formats

Each problem's solution in this repository is organized in the following format to ensure consistency and clarity:

1. **Problem Description**
- **Brief Overview**: A concise description of the problem, including what needs to be solved.
- **Input and Output**: Detailed specifications of the input format, constraints, and the expected output.

2. **Explanation**
- **Approach**: A step-by-step explanation of the approach taken to solve the problem.
- **Algorithm**: Description of the algorithm used, if applicable, including any important details.
- **Complexity Analysis**: An analysis of the time complexity and space complexity of the solution.

3. **Solution Code**
- **Code Implementation**: The Python code that solves the problem. It should be well-commented to explain key parts of the code and any important decisions made during implementation.

## How to Contribute

We welcome contributions to this repository! To help you get started, here’s a guide on how to contribute:

### 1. Fork the Repository

Start by forking the repository to your own GitHub account:

- Click the "Fork" button at the top right of this repository’s page.

### 2. Clone Your Fork

Clone your forked repository to your local machine:

```bash
git clone https://github.com/MohdFaizU/LeetCode-Problems.git
```
### 3. Create a New Branch

Create a new branch for your changes:
```bash
git checkout -b problem/your-problem-name
```
Replace your-problem-name with a descriptive name for the problem or fix you’re working on.

### 4. Make Your Changes

Implement your changes or add new solutions in the appropriate files. Be sure to follow the existing code style and conventions used in the repository.

### 5. Test Your Changes

Make sure to test your changes thoroughly. Ensure that any new code is covered by tests, if applicable, and that all existing tests pass.

### 6. Commit Your Changes

Commit your changes with a descriptive message:

```bash
git add .
git commit -m "Add problem: brief description of your changes"
```
### 7. Push Your Changes

Push your changes to your forked repository:

```bash
git push origin problem/your-problem-name
```
### 8. Create a Pull Request

- Go to the original repository on GitHub and create a pull request:
- Click the "Pull Requests" tab.
- Click the "New Pull Request" button.
- Select your branch from the "compare" dropdown.
- Add a descriptive title and detailed description for your pull request.
- Submit the pull request.

## License

This repository is licensed under the [MIT License](LICENSE) . Feel free to use and modify the code as per the license terms.