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
- Host: GitHub
- URL: https://github.com/codeabinash/leetcode-solutions
- Owner: codeAbinash
- License: mit
- Created: 2022-08-04T17:42:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T10:11:44.000Z (about 1 year ago)
- Last Synced: 2025-04-17T16:03:12.716Z (10 months ago)
- Language: C++
- Homepage: https://leetcode-solutions-delta.vercel.app
- Size: 631 KB
- Stars: 13
- Watchers: 0
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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!