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

https://github.com/codeabinash/leetcode-solutions

Solutions of leetcode problems
https://github.com/codeabinash/leetcode-solutions

Last synced: 10 months ago
JSON representation

Solutions of leetcode problems

Awesome Lists containing this project

README

          

# Leetcode Solutions

[Live Website](https://codeabinash.github.io/leetcode-solutions-web/)





## Installation

Fork this repo then do following things

```bash
$ git clone "https://github.com/YOUR_USER_NAME/leetcode-solutions.git"
$ cd "leetcode-solutions"
$ cd "files/problems"
```

Inside the problems directory make your language directory (e.g. `c`, `py`, `cpp`) then create a file and paste your code, make sure your solution name match our [Code of Contribution](#code-contribution)

# Code Contribution

- Use meaningful variables name, because we don't know whats x and y you are using.
- Leave a comment if you think your code `could be` hard to understand.
- Your code must have Runtime and Space complexity.
- Leave your social in the solution, it will help people connect with other people

Example of valid solution naming:

```
1. two-sum.py
2. move-zeros.py
3. search-in-sorted-array.py
4. two-sum-II.py
```

Example of valid function with valid naming:

```python
FILE: two-sum.py

@USER_NAME
Time: O(n)
Space: O(n); where n is the number elements present in the array

def two_sum(numArr, target):
seen = {}
for idx, val in enumerate(numArr): # loop with index, value
compliment = target - val
if compliment in seen:
return [seen[compliment], idx]
seen[val] = idx

return [-1, -1]

```

---

> ## Be a contributor
>
> Even if you have edited this README.md file or have just added one line of code, you are a contributor and you have helped the community, leave your name inside the [contributors.md](contributors.md) with your socials.

Happy Coding!