https://github.com/ololx/leetcode-solutions
This is my leetcode solutions repository
https://github.com/ololx/leetcode-solutions
algorithms algorithms-and-data-structures java leetcode leetcode-java leetcode-solutions solutions
Last synced: 28 days ago
JSON representation
This is my leetcode solutions repository
- Host: GitHub
- URL: https://github.com/ololx/leetcode-solutions
- Owner: ololx
- License: unlicense
- Created: 2022-02-06T13:45:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-17T05:57:46.000Z (7 months ago)
- Last Synced: 2025-05-19T07:08:17.085Z (about 2 months ago)
- Topics: algorithms, algorithms-and-data-structures, java, leetcode, leetcode-java, leetcode-solutions, solutions
- Language: Java
- Homepage:
- Size: 814 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# leetcode-solutions
This is a repository with my solutions to problems from www.leetcode.com.
[](https://github.com/ololx/leetcode-solutions/commits)
[](https://github.com/ololx/leetcode-solutions/actions/workflows/build.yml)  [](https://codecov.io/gh/ololx/leetcode-solutions)
[](LICENCE)   
## Problems
#
Title
Solution
Difficulty
1
Decode XORed Array
Solution
EASY
2
Count Operations to Obtain Zero
Solution
EASY
3
Best Time to Buy and Sell Stock
Solution
EASY
4
Print in Order
Solution
EASY
5
Print in Order
SolutionV3
EASY
6
Print in Order
SolutionV2
EASY
7
Palindrome Number
Solution
EASY
8
Sum of Two Integers
Solution
EASY
9
Number of Even and Odd Bits
Solution
EASY
10
Pascals Triangle
Solution
EASY
11
Number of Steps to Reduce a Number to Zero
Solution
EASY
12
Buy Two Chocolates
Solution
EASY
13
Two Sum
Solution
EASY
14
Binary Tree Postorder Traversal
Solution
EASY
15
Squares of a Sorted Array
Solution
EASY
16
Remove Letter To Equalize Frequency
Solution
EASY
17
Plus One
Solution
EASY
18
Counter
Solution.js
EASY
19
Isomorphic Strings
Solution
EASY
20
Search Insert Position
Solution
EASY
21
Add Digits
Solution
EASY
22
Sqrt(x)
Solution
EASY
23
Length of Last Word
Solution
EASY
24
Island Perimeter
Solution
EASY
25
Island Perimeter
SolutionV2
EASY
26
Add Binary
Solution
EASY
27
Binary Tree Inorder Traversal
Solution
EASY
28
Implement Queue using Stacks
Solution
EASY
29
Nim Game
Solution
EASY
30
Find the Pivot Integer
Solution
EASY
31
Minimum Bit Flips to Convert Number
Solution
EASY
32
Missing Number
Solution
EASY
33
Missing Number
SolutionV2
EASY
34
Valid Parentheses
Solution
EASY
35
Backspace String Compare
Solution
EASY
36
Backspace String Compare
SolutionV2
EASY
37
Remove Element
Solution
EASY
38
Furthest Point From Origin
Solution
EASY
39
Add Strings
Solution
EASY
40
Running Sum of 1d Array
Solution
EASY
41
Fizz Buzz
Solution
EASY
42
Valid Palindrome II
Solution
EASY
43
Contains Duplicate II
Solution
EASY
44
Contains Duplicate II
SolutionV2
EASY
45
Implement strStr()
Solution
EASY
46
Implement strStr()
SolutionV2
EASY
47
Average Value of Even Numbers That Are Divisible by Three
Solution
EASY
48
Valid Anagram
Solution
EASY
49
Remove Duplicates from Sorted Array
Solution
EASY
50
Reverse Prefix of Word
Solution
EASY
51
Merge Two Sorted Lists
Solution
EASY
52
Maximum Average Subarray I
Solution
EASY
53
Maximum Average Subarray I
SolutionV2
EASY
54
Number Complement
Solution
EASY
55
Merge Sorted Array
Solution
EASY
56
Crawler Log Folder
Solution
EASY
57
Majority Element
Solution
EASY
58
Majority Element
SolutionV2
EASY
59
Merge Strings Alternately
Solution
EASY
60
A Number After a Double Reversal
Solution
EASY
61
Reverse Words in a String III
Solution
EASY
62
Reverse Words in a String III
SolutionV2
EASY
63
Sort Integers by The Number of 1 Bits
Solution
EASY
64
Excel Sheet Column Title
Solution
EASY
65
Design HashMap
Solution
EASY
66
Sum of Squares of Special Elements
Solution
EASY
67
Maximum Depth of Binary Tree
Solution
EASY
68
Maximum Length Substring With Two Occurrences
Solution
EASY
69
Counting Bits
Solution
EASY
70
Counting Bits
SolutionV2
EASY
71
Find First Palindromic String in the Array
Solution
EASY
72
Reverse String
Solution
EASY
73
Excel Sheet Column Number
Solution
EASY
74
Valid Palindrome
Solution
EASY
75
Reverse String II
Solution
EASY
76
Reverse String II
SolutionV2
EASY
77
First Letter to Appear Twice
Solution
EASY
78
Linked List Cycle
Solution
EASY
79
UNKNOWN
Solution
EASY
80
Divide a String Into Groups of Size k
Solution
EASY
81
Power of Four
Solution
EASY
82
Find the Difference
Solution
EASY
83
Find Smallest Letter Greater Than Target
Solution
EASY
84
Find Smallest Letter Greater Than Target
SolutionV2
EASY
85
Path Sum
Solution
EASY
86
Word Pattern
Solution
EASY
87
Hamming Distance
Solution
EASY
88
Hamming Distance
SolutionV3
EASY
89
Hamming Distance
SolutionV2
EASY
90
Construct the Rectangle
Solution
EASY
91
Reverse Linked List
Solution
EASY
92
Positions of Large Groups
Solution
EASY
93
Positions of Large Groups
SolutionV2
EASY
94
Number of Segments in a String
Solution
EASY
95
Complement of Base 10 Integer
Solution
EASY
96
Reformat Phone Number
Solution
EASY
97
Number of Unequal Triplets in Array
Solution
EASY
98
Check if Numbers Are Ascending in a Sentence
Solution
EASY
99
Power of Two
Solution
EASY
100
Power of Two
SolutionV2
EASY
101
Check if Number Has Equal Digit Count and Digit Value
Solution
EASY
102
Most Frequent Even Element
Solution
EASY
103
Remove Duplicates from Sorted List
Solution
EASY
104
Implement Stack using Queues
Solution
EASY
105
First Bad Version
Solution
EASY
106
Counter II
Solution.js
EASY
107
Baseball Game
Solution
EASY
108
Roman to Integer
Solution
EASY
109
Convert the Temperature
Solution
EASY
110
Longest Common Prefix
Solution
EASY
111
Move Zeroes
Solution
EASY
112
Symmetric Tree
Solution
EASY
113
Min Stack
Solution
EASY
114
Min Stack
SolutionV2
EASY
115
Fibonacci Number
Solution
EASY
116
Binary Search
Solution
EASY
117
Rearrange Spaces Between Words
Solution
EASY
118
Reverse Bits
Solution
EASY
119
Same Tree
Solution
EASY
120
Range Sum Query - Immutable
Solution
EASY
121
Single Number
Solution
EASY
122
Single Number
SolutionV2
EASY
123
Count Good Triplets
Solution
EASY
124
Check if All As Appears Before All Bs
Solution
EASY
125
Number of 1 Bits
Solution
EASY
126
Design HashSet
Solution
EASY
127
Is Subsequence
Solution
EASY
128
Text Justification
Solution
HARD
129
Design Skiplist
Solution
HARD
130
Valid Number
Solution
HARD
131
LFU Cache
Solution
HARD
132
Design a Text Editor
Solution
HARD
133
Reverse Integer
Solution
MEDIUM
134
UNKNOWN
Solution
MEDIUM
135
Validate Stack Sequences
Solution
MEDIUM
136
Zigzag Conversion
Solution
MEDIUM
137
Flatten Nested List Iterator
Solution
MEDIUM
138
Binary Search Tree Iterator
Solution
MEDIUM
139
String to Integer (atoi)
Solution
MEDIUM
140
Print FooBar Alternately
Solution
MEDIUM
141
Rotate List
Solution
MEDIUM
142
Spiral Matrix II
Solution
MEDIUM
143
Spiral Matrix II
SolutionV2
MEDIUM
144
UNKNOWN
Solution
MEDIUM
145
Single Number III
Solution
MEDIUM
146
Score of Parentheses
Solution
MEDIUM
147
Container With Most Water
Solution
MEDIUM
148
Max Number of K-Sum Pairs
Solution
MEDIUM
149
Minimum Remove to Make Valid Parentheses
Solution
MEDIUM
150
Jump Game II
Solution
MEDIUM
151
K Radius Subarray Averages
Solution
MEDIUM
152
Search a 2D Matrix
Solution
MEDIUM
153
Search a 2D Matrix
SolutionV2
MEDIUM
154
Remove Nth Node From End of List
Solution
MEDIUM
155
H-Index
Solution
MEDIUM
156
Find the Duplicate Number
Solution
MEDIUM
157
Majority Element II
Solution
MEDIUM
158
Encode and Decode TinyURL
Solution
MEDIUM
159
Maximum Depth of N-ary Tree
Solution
MEDIUM
160
Evaluate Reverse Polish Notation
Solution
MEDIUM
161
Building H2O
Solution
MEDIUM
162
Longest Substring Without Repeating Characters
Solution
MEDIUM
163
Longest Substring Without Repeating Characters
SolutionV2
MEDIUM
164
Flatten Binary Tree to Linked List
Solution
MEDIUM
165
Find the Longest Substring Containing Vowels in Even Counts
Solution
MEDIUM
166
Add Two Numbers
Solution
MEDIUM
167
LRU Cache
Solution
MEDIUM
168
Print Zero Even Odd
Solution
MEDIUM
169
Unique Paths
Solution
MEDIUM
170
Spiral Matrix
SolutionV2
MEDIUM
171
Append Characters to String to Make Subsequence
Solution
MEDIUM
172
Number of Islands
Solution
MEDIUM
173
Jump Game
Solution
MEDIUM
174
Unique Paths II
Solution
MEDIUM
175
Minimum Path Sum
Solution
MEDIUM
176
Map Sum Pairs
Solution
MEDIUM
177
Rotate Image
Solution
MEDIUM
178
Swap Nodes in Pairs
Solution
MEDIUM
179
Integer to Roman
Solution
MEDIUM
180
Simplify Path
Solution
MEDIUM
181
Remove Duplicates from Sorted List II
Solution
MEDIUM
182
Find The Original Array of Prefix Xor
Solution
MEDIUM
183
Peeking Iterator
Solution
MEDIUM
184
Peeking Iterator
SolutionV2
MEDIUM
185
Number of Matching Subsequences
Solution
MEDIUM
186
UTF-8 Validation
Solution
MEDIUM
187
Jump Game III
Solution
MEDIUM
188
Fizz Buzz Multithreaded
Solution
MEDIUM
189
Range Sum Query 2D - Immutable
Solution
MEDIUM
190
House Robber
Solution
MEDIUM
191
House Robber
SolutionV2
MEDIUM