Skip to content

Commit b01f0f2

Browse files
committed
Add poetry and pre-commit hooks
1 parent 21975fa commit b01f0f2

File tree

5 files changed

+1405
-29
lines changed

5 files changed

+1405
-29
lines changed

.pre-commit-config.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
default_language_version:
2+
python: python3.8
3+
4+
fail_fast: true
5+
6+
repos:
7+
- repo: local
8+
hooks:
9+
- id: isort
10+
name: isort
11+
entry: poetry run isort --check-only
12+
args: [.]
13+
language: system
14+
pass_filenames: false
15+
16+
- id: black
17+
name: black
18+
entry: poetry run black --check
19+
args: [.]
20+
language: system
21+
pass_filenames: false
22+
23+
- id: pylint
24+
name: pylint
25+
entry: poetry run pylint
26+
args: [problems]
27+
language: system
28+
pass_filenames: false
29+
30+
- id: pylint-tests
31+
name: pylint
32+
entry: poetry run pylint
33+
args: [tests]
34+
language: system
35+
pass_filenames: false

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.8.5

README.md

+29-29
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ Solutions for https://leetcode.com/ algorithmic problems.
44

55
| Problem | Solution |
66
| ------------- | ------------- |
7-
| [Two Sum](https://leetcode.com/problems/two-sum/) | [0001](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0001.py) |
8-
| [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [0002](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0002.py) |
9-
| [Reverse Integer](https://leetcode.com/problems/reverse-integer/)|[0007](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0007.py) |
10-
| [Palindrome Number](https://leetcode.com/problems/palindrome-number/) | [0009](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0009.py) |
11-
| [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [0011](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0011.py) |
12-
| [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | [0013](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0013.py) |
13-
| [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | [0014](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0014.py) |
14-
| [3Sum](https://leetcode.com/problems/3sum/) | [0015](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0015.py) |
15-
| [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [0020](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0020.py) |
16-
| [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [0026](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0026.py) |
17-
| [Remove Element](https://leetcode.com/problems/remove-element/) | [0027](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0027.py) |
18-
| [Implement strStr()](https://leetcode.com/problems/implement-strstr/) | [0028](https://github.com/varvarvarvar/leetcode/blob/master/solutions/0028.py) |
19-
| [Sort Colors](https://leetcode.com/problems/sort-colors/) | [0075](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0075.py) |
20-
| [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) | [0125](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0125.py) |
21-
| [Rotate Array](https://leetcode.com/problems/rotate-array/) | [0189](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0189.py) |
22-
| [House Robber](https://leetcode.com/problems/house-robber/) | [0198](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0198.py) |
23-
| [Count Primes](https://leetcode.com/problems/count-primes/) | [0204](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0204.py) |
24-
| [Reverse String](https://leetcode.com/problems/reverse-string/) | [0344](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0344.py) |
25-
| [Find All Duplicates in an Array](https://leetcode.com/problems/find-all-duplicates-in-an-array/) | [0442](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0442.py) |
26-
| [4Sum II](https://leetcode.com/problems/4sum-ii/) | [0454](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0454.py) |
27-
| [Keyboard Row](https://leetcode.com/problems/keyboard-row/) | [0500](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0500.py) |
28-
| [Find Bottom Left Tree Value](https://leetcode.com/problems/find-bottom-left-tree-value/) | [0513](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0513.py) |
29-
| [Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/) | [0515](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0515.py) |
30-
| [Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/) | [0540](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0540.py) |
31-
| [Maximum Binary Tree](https://leetcode.com/problems/maximum-binary-tree/) | [0654](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0654.py) |
32-
| [Robot Return to Origin](https://leetcode.com/problems/robot-return-to-origin/) | [0657](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0657.py) |
33-
| [Non-decreasing Array](https://leetcode.com/problems/non-decreasing-array/) | [0665](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0665.py) |
34-
| [Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/) | [0674](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0674.py) |
35-
| [Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/) | [0771](https://github.com/varvara-krasavina/leetcode/blob/master/solutions/0771.py) |
7+
| [Two Sum](https://leetcode.com/problems/two-sum/) | [0001](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0001.py) |
8+
| [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) | [0002](https://github.com/varvara-krasavina/leetcode/blob/master/probmels/0002.py) |
9+
| [Reverse Integer](https://leetcode.com/problems/reverse-integer/)|[0007](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0007.py) |
10+
| [Palindrome Number](https://leetcode.com/problems/palindrome-number/) | [0009](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0009.py) |
11+
| [Container With Most Water](https://leetcode.com/problems/container-with-most-water/) | [0011](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0011.py) |
12+
| [Roman to Integer](https://leetcode.com/problems/roman-to-integer/) | [0013](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0013.py) |
13+
| [Longest Common Prefix](https://leetcode.com/problems/longest-common-prefix/) | [0014](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0014.py) |
14+
| [3Sum](https://leetcode.com/problems/3sum/) | [0015](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0015.py) |
15+
| [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/) | [0020](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0020.py) |
16+
| [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [0026](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0026.py) |
17+
| [Remove Element](https://leetcode.com/problems/remove-element/) | [0027](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0027.py) |
18+
| [Implement strStr()](https://leetcode.com/problems/implement-strstr/) | [0028](https://github.com/varvarvarvar/leetcode/blob/master/problems/0028.py) |
19+
| [Sort Colors](https://leetcode.com/problems/sort-colors/) | [0075](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0075.py) |
20+
| [Valid Palindrome](https://leetcode.com/problems/valid-palindrome/) | [0125](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0125.py) |
21+
| [Rotate Array](https://leetcode.com/problems/rotate-array/) | [0189](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0189.py) |
22+
| [House Robber](https://leetcode.com/problems/house-robber/) | [0198](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0198.py) |
23+
| [Count Primes](https://leetcode.com/problems/count-primes/) | [0204](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0204.py) |
24+
| [Reverse String](https://leetcode.com/problems/reverse-string/) | [0344](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0344.py) |
25+
| [Find All Duplicates in an Array](https://leetcode.com/problems/find-all-duplicates-in-an-array/) | [0442](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0442.py) |
26+
| [4Sum II](https://leetcode.com/problems/4sum-ii/) | [0454](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0454.py) |
27+
| [Keyboard Row](https://leetcode.com/problems/keyboard-row/) | [0500](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0500.py) |
28+
| [Find Bottom Left Tree Value](https://leetcode.com/problems/find-bottom-left-tree-value/) | [0513](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0513.py) |
29+
| [Find Largest Value in Each Tree Row](https://leetcode.com/problems/find-largest-value-in-each-tree-row/) | [0515](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0515.py) |
30+
| [Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/) | [0540](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0540.py) |
31+
| [Maximum Binary Tree](https://leetcode.com/problems/maximum-binary-tree/) | [0654](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0654.py) |
32+
| [Robot Return to Origin](https://leetcode.com/problems/robot-return-to-origin/) | [0657](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0657.py) |
33+
| [Non-decreasing Array](https://leetcode.com/problems/non-decreasing-array/) | [0665](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0665.py) |
34+
| [Longest Continuous Increasing Subsequence](https://leetcode.com/problems/longest-continuous-increasing-subsequence/) | [0674](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0674.py) |
35+
| [Jewels and Stones](https://leetcode.com/problems/jewels-and-stones/) | [0771](https://github.com/varvara-krasavina/leetcode/blob/master/problems/problem_0771.py) |

0 commit comments

Comments
 (0)