- A collection of challenges and exercises written in C++.
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
0066 | Plus One | 1st | O(n) | O(1) | Easy |
0169 | Majority Element | C++ | O(n) | O(1) | Easy |
0238 | Product of Array Except Self | 1st | O(n) | O(1) | Medium |
0724 | Find Pivot Index | 1st | O(n) | O(1) | Easy |
0747 | Largest Number At Least Twice of Others | 1st | O(n) | O(1) | Easy |
1413 | Minimum Value to Get Positive Step by Step Sum | 1st | O(n) | O(1) | Easy |
1414 | Find the Minimum Number of Fibonacci Numbers Whose Sum is K | 1st | O(n) | O(1) | Medium |
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
0278 | First Bad Version | 1st | O(logn) | O(1) | Easy |
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
0476 | Number Complement | C++ | O(n) | O(n) |
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
0383 | Ransom Note C++ | O(n+m) | O(n) | Easy | |
1108 | Defanging an IP Address | 1st | O(n) | O(1) | Easy |
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
0064 | Minimum Path Sum | 1st | O(m * n) | O(m + n) | Medium |
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
0387 | First Unique Character in a String | C++ | O(n) | O(1) | |
0771 | Jewels and Stones | 1st | O(n^2) | O(1) | Easy |
Day | Problem | Solution | Time | Space |
---|---|---|---|---|
14 | Perform String Shifts | 1st | ||
15 | Product of Array Except Self | 1st | ||
16 | Minimum Path Sum | 1st | O(m * n) | O(m + n) |
Day | Problem | Solution | Time | Space |
---|---|---|---|---|
1 | First Bad Version | 1st | O(logn) | O(1) |
2 | Jewels and Stones | 1st | O(nm) | O(1) |
3 | Ransom Note C++ | O(n+m) | O(n) | |
4 | Number Complement | C++ | O(n) | O(n) |
5 | First Unique Character in a String | C++ | O(n) | O(1) |
6 | Majority Element | C++ | O(n) | O(1) |
Day | Problem | Solution | Difficulty |
---|---|---|---|
0 | Hello, World. | 1st | Easy |
1 | Data Types | 1st | Easy |
2 | Operators | 1st | Easy |
3 | Intro to Conditional Statements | 1st | Easy |
4 | Class vs. Instance | 1st | Easy |
5 | Loops | 1st | Easy |
6 | Let's Review | 1st | Easy |
7 | Arrays | 1st | Easy |
8 | Dictionaries and Maps | 1st | Easy |
9 | Recusion | 1st | Easy |
10 | Binary Numbers | 1st | Easy |
11 | 2D Arrays | 1st | Easy |
Problem | Solution |
---|---|
Half of a Square | 1st |
# | Problem | Solution | Time | Space | Difficulty |
---|---|---|---|---|---|
977A | Wrong Subtraction | 1st | O(n) | O(1) | 500 |