- Math
- Bit Manipulation
- Array
- String
- Matrix
- Hash Table
- Binary Search
- Sorting
- Two Pointers
- Dynamic Programming
# | Title | Explanation | Complexity | Difficulty |
---|---|---|---|---|
9 | Palindrome Number | Explained Solution | Time - O(log10(n)) Space - O(1) |
Easy |
50 | Pow(x, n) | Explained Solution | Time - O(log2(n)) Space - O(1) |
Medium |
191 | Number of 1 Bits | Explained Solution | Time - O(1) Space - O(1) |
Easy |
1431 | Kids With the Greatest Number of Candies | Commented Solution | Time - O(n) Space - O(n) |
Easy |
1470 | Shuffle The Array | Explained Solution | Time - O(n) Space - O(1) |
Easy |
2129 | Capitalize the Title | Explained Solution | Time - O(n) Space - O(1) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
7 | Reverse Integer | C++ Java |
Time - O(log10(n)) Space - O(1) |
Medium |
9 | Palindrome Number | C++ Java |
Time - O(log10(n)) Space - O(1) |
Easy |
50 | Pow(x, n) | Java | Time - O(log2(n)) Space - O(1) |
Medium |
67 | Add Binary | Java | Time - O(max(n, m)) Space - O(max(n, m)) |
Easy |
172 | Factorial Trailing Zeroes | C++ Java |
Time - O(log5(n)) Space - O(1) |
Medium |
231 | Power Of Two | C++ Java |
Time - O(1) Space - O(1) |
Easy |
263 | Ugly Number | C++ Java |
Time - O(log2(n)) Space - O(1) |
Easy |
1137 | N-th Tribonacci Number | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1281 | Subtract the Product and Sum of Digits of an Integer | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1342 | Number of Steps to Reduce a Number to Zero | C++ Java |
Time - O(log2(n)) Space - O(1) |
Easy |
1551 | Minimum Operations to Make Array Equal | C++ Java |
Time - O(1) Space - O(1) |
Medium |
1688 | Count of Matches in Tournament | C++ Java |
Time - O(1) Space - O(1) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
191 | Number of 1 Bits | C++ Java |
Time - O(1) Space - O(1) |
Easy |
231 | Power Of Two | C++ Java |
Time - O(1) Space - O(1) |
Easy |
476 | Number Complement | C++ Java |
Time - O(log2(n)) Space - O(1) |
Easy |
1720 | Decode XORed Array | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1009 | Complement of Base 10 Integer | C++ Java |
Time - O(log2(n)) Space - O(1) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
1 | Two Sum | Java | Time - O(n) Space - O(n) |
Easy |
80 | Remove Duplicates from Sorted Array II | C++ Java |
Time - O(n) Space - O(1) |
Medium |
136 | Single Number | C++ Java |
Time - O(n) Space - O(1) |
Easy |
162 | Find Peak Element | C++ Java |
Time - O(log2(n)) Space - O(1) |
Medium |
500 | Keyboard Row | Java | Time - O(N) Space - O(n) |
Easy |
1094 | Car Pooling | C++Java | Time - O(n) Space - O(n) |
Medium |
848 | Shifting Letters | C++ Java |
Time - O(n) Space - O(1) |
Medium |
1207 | Unique Number of Occurrences | Java | Time - O(n) Space - O(n) |
Easy |
1295 | Find Numbers with Even Number of Digits | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1365 | How Many Numbers Are Smaller Than the Current Number | C++ Java |
Time - O(n + m) Space - O(m) |
Easy |
1431 | Kids With the Greatest Number of Candies | C++ Java |
Time - O(n) Space - O(n) |
Easy |
1470 | Shuffle The Array | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1480 | Running Sum of 1d Array | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1512 | Number of Good Pairs | C++ Java |
Time - O(n) Space - O(n) |
Easy |
1550 | Three Consecutive Odds | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1646 | Get Maximum in Generated Array | C++ Java |
Time - O(n) Space - O(n) |
Easy |
1662 | Check If Two String Arrays are Equivalent | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1672 | Richest Customer Wealth | C++ Java |
Time - O(m * n) Space - O(1) |
Easy |
1720 | Decode XORed Array | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1748 | Sum of Unique Elements | C++ Java |
Time - O(n) Space - O(m) |
Easy |
1909 | Remove One Element to Make the Array Strictly Increasing | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1929 | Concatenation of Array | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1979 | Find Greatest Common Divisor of Array | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1980 | Find Unique Binary String | C++ Java |
Time - O(n) Space - O(1) |
Medium |
2006 | Count Number of Pairs With Absolute Difference K | C++ Java |
Time - O(n + m) Space - O(m) |
Easy |
2011 | Final Value of Variable After Performing Operations | C++ Java |
Time - O(n) Space - O(m) |
Easy |
2023 | Number of Pairs of Strings With Concatenation Equal to Target | Java | Time - O(n * m) Space - O(n) |
Easy |
2078 | Two Furthest Houses With Different Colors | C++Java | Time - O(n) Space - O(1) |
Easy |
2114 | Maximum Number of Words Found in Sentences | C++Java | Time - O(n * m) Space - O(1) |
Easy |
189 | Rotate Array | Java | Time - O(n) Space - O(1) |
Medium |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
49 | Group Anagrams | Java | Time - O(n * m) Space - O(n) |
Medium |
125 | Valid Palindrome | C++ Java |
Time - O(n) Space - O(1) |
Easy |
151 | Reverse Words in a String | Java | Time - O(n * m) Space - O(n) |
Medium |
344 | Reverse String | C++ Java |
Time - O(n) Space - O(1) |
Easy |
500 | Keyboard Row | Java | Time - O(n) Space - O(n) |
Easy |
796 | Rotate String | C++ Java |
Time - O(m * n) Space - O(1) |
Easy |
848 | Shifting Letters | C++ Java |
Time - O(n) Space - O(1) |
Medium |
1446 | Consecutive Characters | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1461 | Check If a String Contains All Binary Codes of Size K | Java | Time - O(n) Space - O(2k) |
Medium |
1528 | Shuffle String | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1544 | Make The String Great | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1662 | Check If Two String Arrays are Equivalent | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1678 | Goal Parser Interpretation | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1790 | Check if One String Swap Can Make Strings Equal | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1796 | Second Largest Digit in a String | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1816 | Truncate Sentence | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1844 | Replace All Digits with Characters | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1945 | Sum of Digits of String After Convert | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1941 | Check if All Characters Have Equal Number of Occurrences | C++ Java |
Time - O(n) Space - O(1) |
Easy |
2000 | Reverse Prefix of Word | C++ Java |
Time - O(n) Space - O(1) |
Easy |
2042 | Check if Numbers Are Ascending in a Sentence | C++ Java |
Time - O(n) Space - O(1) |
Easy |
2103 | Rings and Rods | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1456 | Maximum Number of Vowels in a Substring of Given Length | C++ Java |
Time - O(n) Space - O(1) |
Medium |
2068 | Check Whether Two Strings are Almost Equivalent | C++ Java |
Time - O(n) Space - O(1) |
Easy |
2124 | Check if All A's Appears Before All B's | C++ Java |
Time - O(n) Space - O(1) |
Easy |
2129 | Capitalize the Title | Explanation C++ Java |
Time - O(n) Space - O(1) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
566 | Reshape the Matrix | C++ Java |
Time - O(m * n) Space - O(1) |
Easy |
867 | Transpose Matrix | C++ Java |
Time - O(m * n) Space - O(1) |
Easy |
1572 | Matrix Diagonal Sum | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1672 | Richest Customer Wealth | C++ Java |
Time - O(m * n) Space - O(1) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
1 | Two Sum | Java | Time - O(n) Space - O(n) |
Easy |
49 | Group Anagrams | Java | Time - O(n * m) Space - O(n) |
Medium |
500 | Keyboard Row | Java | Time - O(n) Space - O(n) |
Easy |
1207 | Unique Number of Occurrences | Java | Time - O(n) Space - O(n) |
Easy |
1365 | How Many Numbers Are Smaller Than the Current Number | C++ Java |
Time - O(n + m) Space - O(m) |
Easy |
2053 | Kth Distinct String in an Array | Java | Time - O(n) Space - O(n) |
Easy |
2085 | Count Common Words With One Occurrence | Java | Time - O(n + m) Space - O(n) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
162 | Find Peak Element | C++ Java |
Time - O(log2(n)) Space - O(1) |
Medium |
704 | Binary Search | C++ Java |
Time - O(log2(n)) Space - O(1) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
1365 | How Many Numbers Are Smaller Than the Current Number | C++ Java |
Time - O(n + m) Space - O(m) |
Easy |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
80 | Remove Duplicates from Sorted Array II | C++ Java |
Time - O(n) Space - O(1) |
Medium |
# | Title | Solution | Complexity | Difficulty |
---|---|---|---|---|
264 | Ugly Number II | C++ Java |
Time - O(n) Space - O(n) |
Medium |
1137 | N-th Tribonacci Number | C++ Java |
Time - O(n) Space - O(1) |
Easy |
1646 | Get Maximum in Generated Array | C++ Java |
Time - O(n) Space - O(n) |
Easy |