Skip to content

Latest commit

 

History

77 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions

My solutions to LeetCode problems in JavaScript and Python. I did them as daily "marathons" (30 days in JS, 20 days in Python) to get better at algorithms and data structures. Every solution has tests, and most of them have a link to my explanation on LeetCode.

Built with

  • JavaScript (Node.js) + Jest for tests
  • Python 3 + pytest for tests

How to run

git clone https://github.com/IkboljonMe/leetcode.git
cd leetcode

JavaScript

cd JavaScript
npm install
npm test

Run tests for one problem:

npm test -- 30days_marathon/2_day/PlusOne

Python

cd Python
pip install -r requirements.txt
pytest

Run tests for one problem:

pytest -k "isAnagram"

JavaScript problems

Day Problem Difficulty Solution
1 4. Median of Two Sorted Arrays Hard code
1 26. Remove Duplicates from Sorted Array Easy code
1 1207. Unique Number of Occurrences Easy code
2 66. Plus One Easy code
3 1929. Concatenation of Array Easy code
3 268. Missing Number Easy code
4 121. Best Time to Buy and Sell Stock Easy code
5 26. Remove Duplicates from Sorted Array (O(1) memory) Easy code
5 1480. Running Sum of 1d Array Easy code
6 9. Palindrome Number Easy code
7 205. Isomorphic Strings Easy code
7 392. Is Subsequence Easy code
8 21. Merge Two Sorted Lists Easy code
8 206. Reverse Linked List Easy code
9 141. Linked List Cycle Easy code
9 409. Longest Palindrome Easy code
9 876. Middle of the Linked List Easy code
10 136. Single Number Easy code
11 349. Intersection of Two Arrays Easy code
12 217. Contains Duplicate Easy code
12 371. Sum of Two Integers Medium code
13 238. Product of Array Except Self Medium code
14 152. Maximum Product Subarray Medium code
14 53. Maximum Subarray Medium code
15 153. Find Minimum in Rotated Sorted Array Medium code
16 33. Search in Rotated Sorted Array Medium code
17 70. Climbing Stairs Easy code

Python problems

Day Problem Difficulty Solution
1 27. Remove Element Easy code
2 28. Find the Index of the First Occurrence in a String Easy code
3 35. Search Insert Position Easy code
4 1470. Shuffle the Array Easy code
5 1920. Build Array from Permutation Easy code
6 217. Contains Duplicate Easy code
7 242. Valid Anagram Easy code
8 49. Group Anagrams Medium code
9 36. Valid Sudoku Medium code

License

MIT, see LICENSE.


Made by IkboljonMe

About

My LeetCode solutions in JavaScript and Python, tested with Jest and pytest.

Topics

Resources

Stars

5 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages