Skip to content

KevinEsh/leetcode-algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

113 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Algorithms

Language Update Progress License

C++ solution for Leetcode

C++ solution of problems from LeetCode.

# Title Solution
1 Suffix Array C++
2 Longest Common Prefix C++
# Title Solution Difficulty
1929 Concatenation of Array C++ Easy
1920 Build Array from Permutation C++ Easy
# Title Solution Difficulty
1773 Count Items Matching a Rule C++ Easy
1769 Minimum Number of Operations to Move All Balls to Each Box C++ Easy
1720 Decode XORed Array C++ Easy
# Title Solution Difficulty
1689 Partitioning Into Minimum Number Of Deci-Binary Numbers C++ Medium
1678 Goal Parser Interpretation C++ Easy
1672 Richest Customer Wealth C++ Easy
1603 Design Parking System C++ Easy
# Title Solution Difficulty
1528 Shuffle String C++ Easy
1512 Number of Good Pairs C++ Easy
# Title Solution Difficulty
1480 Running Sum of 1d Array C++ Easy
1470 Shuffle the Array C++ Easy
1431 Kids With the Greatest Number of Candies C++ Easy
# Title Solution Difficulty
1389 Create Target Array in the Given Order C++ Easy
1365 How Many Numbers Are Smaller Than the Current Number C++ Easy
1342 Number of Steps to Reduce a Number to Zero C++ Easy
1313 Decompress Run-Length Encoded List C++ Easy
# Title Solution Difficulty
1296 Divide Array in Sets of K Consecutive Numbers C++ Medium
1295 Find Numbers with Even Number of Digits C++ Easy
1291 Sequential Digits C++ Medium
1290 Convert Binary Number in a Linked List to Integer C++ Easy
1283 Find the Smallest Divisor Given a Threshold C++ Medium
1282 Group the People Given the Group Size They Belong To C++ Medium
1281 Subtract the Product and Sum of Digits of an Integer C++ Easy
1277 Count Square Submatrices with All Ones C++ Medium
1276 Number of Burgers with No Waste of Ingredients C++ Medium
1275 Find Winner on a Tic Tac Toe Game C++ Easy
1268 Search Suggestions System C++ Medium
1267 Count Servers that Communicate C++ Medium
1266 Minimum Time Visiting All Points C++ Easy
1200 Minimum Absolute Difference C++ Easy
# Title Solution Difficulty
1191 K-Concatenation Maximum Sum C++ Medium
1190 Reverse Substrings Between Each Pair of Parentheses C++ Medium
1189 Maximum Number of Balloons C++ Easy
1186 Maximum Subarray Sum with One Deletion C++ Medium
1185 Day of the Week C++ Easy
1184 Distance Between Bus Stops C++ Easy
1108 Defanging an IP Address C++ Easy
# Title Solution Difficulty
1092 Shortest Common Supersequence C++ Hard
1091 Shortest Path in Binary Matrix C++ Medium
1090 Largest Values From Labels C++ Medium
1089 Duplicate Zeros C++ Easy
1088 Confusing Number II C++ Hard
1087 Brace Expansion C++ Medium
1086 High Five C++ Medium
1085 Sum of Digits in the Minimum Number C++ Medium
1081 Smallest Subsequence of Distinct Characters C++ Medium
1080 Insufficient Nodes in Root to Leaf Paths C++ Medium
1079 Letter Tile Possibilities C++ Medium
1078 Occurrences After Bigram C++ Easy
1074 Number of Submatrices That Sum to Target C++ Hard
1073 Adding Two Negabinary Numbers C++ Medium
1072 Flip Columns For Maximum Number of Equal Rows C++ Medium
1071 Greatest Common Divisor of Strings C++ Easy
1065 Index Pairs of a String C++ Easy
1064 Fixed Point C++ Easy
1054 Distant Barcodes C++ Medium
1053 Previous Permutation With One Swap C++ Medium
1052 Grumpy Bookstore Owner C++ Medium
1051 Height Checker C++ Easy
1048 Longest String Chain C++ Medium
1047 Remove All Adjacent Duplicates In String C++ Easy
1046 Last Stone Weight C++ Easy
1044 Longest Duplicate Substring C++ Hard
1043 Partition Array for Maximum Sum C++ Medium
1042 Flower Planting With No Adjacent C++ Easy
1041 Robot Bounded In Circle C++ Easy
1039 Minimum Score Triangulation of Polygon C++ Medium
1038 Binary Search Tree to Greater Sum Tree C++ Medium
1037 Valid Boomerang C++ Easy
1035 Uncrossed Lines C++ Medium
1034 Coloring A Border C++ Medium
1033 Moving Stones Until Consecutive C++ Easy
1032 Stream of Characters C++ Hard
1031 Maximum Sum of Two Non-Overlapping Subarrays C++ Medium
1030 Matrix Cells in Distance Order C++ Easy
1029 Two City Scheduling C++ Easy
1028 Recover a Tree From Preorder Traversal C++ Hard
1027 Longest Arithmetic Sequence C++ Medium
1026 Maximum Difference Between Node and Ancestor C++ Medium
1025 Divisor Game C++ Easy
1023 Camelcase Matching C++ Medium
1022 Sum of Root To Leaf Binary Numbers C++ Easy
1021 Remove Outermost Parentheses C++ Easy
1020 Number of Enclaves C++ Medium
1019 Next Greater Node In Linked List C++ Medium
1018 Binary Prefix Divisible By 5 C++ Easy
1017 Convert to Base -2 C++ Medium
1016 Binary String With Substrings Representing 1 To N C++ Medium
1015 Smallest Integer Divisible by K C++ Medium
1014 Best Sightseeing Pair C++ Medium
1013 Partition Array Into Three Parts With Equal Sum C++ Easy
1011 Capacity To Ship Packages Within D Days C++ Medium
1010 Pairs of Songs With Total Durations Divisible by 60 C++ Easy
1009 Complement of Base 10 Integer C++ Easy
1008 Construct Binary Search Tree from Preorder Traversal C++ Medium
1007 Minimum Domino Rotations For Equal Row C++ Medium
1006 Clumsy Factorial C++ Medium
1005 Maximize Sum Of Array After K Negations C++ Easy
1004 Max Consecutive Ones III C++ Medium
1003 Check If Word Is Valid After Substitutions C++ Medium
1002 Find Common Characters C++ Easy
# Title Solution Difficulty
999 Available Captures for Rook C++ Medium
998 Maximum Binary Tree II C++ Easy
997 Find the Town Judge C++ Easy
995 Minimum Number of K Consecutive Bit Flips C++ Hard
994 Rotting Oranges C++ Easy
993 Cousins in Binary Tree C++ Easy
991 Broken Calculator C++ Medium
990 Satisfiability of Equality Equations C++ Medium
989 Add to Array-Form of Integer C++ Easy
988 Smallest String Starting From Leaf C++ Medium
985 Sum of Even Numbers After Queries C++ Easy
984 String Without AAA or BBB C++ Easy
983 Minimum Cost For Tickets C++ Medium
981 Time Based Key-Value Store C++ Medium
977 Squares of a Sorted Array C++ Easy
926 Flip String to Monotone Increasing C++ Medium
# Title Solution Difficulty
771 Jewels and Stones C++ Easy
709 To Lower Case C++ Easy
# Title Solution Difficulty
681 Next Closest Time C++ Medium
674 Longest Continuous Increasing Subsequence C++ Easy
673 Number of Longest Increasing Subsequence C++ Medium
# Title Solution Difficulty
482 License Key Formatting C++ Easy
454 4Sum II C++ Medium
448 Find All Numbers Disappeared in an Array C++ Easy
442 Find All Duplicates in an Array C++ Easy
418 Sentence Screen Fitting C++ Medium
410 Split Array Largest Sum C++ Hard
# Title Solution Difficulty
393 UTF-8 Validation C++ Medium
388 Longest Absolute File Path C++ Medium
387 First Unique Character in a String C++ Easy
382 Linked List Random Node C++ Hard
380 Insert Delete GetRandom O(1) C++ Hard
378 Kth Smallest Element in a Sorted Matrix C++ Medium
361 Bomb Enemy C++ Medium
350 Intersection of Two Arrays II C++ Easy
347 Top K Frequent Elements C++ Medium
346 Moving Average from Data Stream C++ Easy
340 Longest Substring with At Most K Distinct Characters C++ Hard
334 Increasing Triplet Subsequence C++ Medium
332 Reconstruct Itinerary C++ Medium
329 Longest Increasing Path in a Matrix C++ Medium
328 Odd Even Linked List C++ Easy
326 Power of Three C++ Easy
322 Coin Change C++ Medium
315 Count of Smaller Numbers After Self C++ Hard
307 Range Sum Query - Mutable C++ Medium
301 Remove Invalid Parentheses C++ Hard
# Title Solution Difficulty
300 Longest Increasing Subsequence C++ Medium
298 Binary Tree Longest Consecutive Sequence C++ Medium
297 Serialize and Deserialize Binary Tree C++ Hard
295 Find Median from Data Stream C++ Hard
289 Game of Life C++ Medium
287 Find the Duplicate Number C++ Hard
285 Inorder Successor in BST C++ Medium
283 Move Zeros C++ Easy
281 Zigzag Iterator C++ Medium
279 Perfect Squares C++ Medium
268 Missing Number C++ Easy
257 Binary Tree Paths C++ Easy
253 Meeting Rooms II C++ Medium
240 Search a 2D Matrix II C++ Medium
239 Sliding Window Maximum C++ Hard
238 Product of Array Except Self C++ Medium
236 Lowest Common Ancestor of a Binary Tree C++ Medium
235 Lowest Common Ancestor of a Binary Search Tree C++ Easy
234 Palindrome Linked List C++ Easy
230 Kth Smallest Element in a BST C++ Medium
226 Invert Binary Tree C++ Easy
215 Kth Largest Element in an Array C++ Medium
210 Course Schedule II C++ Medium
208 Implement Trie (Prefix Tree) C++ Medium
207 Course Schedule C++ Medium
206 Reverse Linked List C++ Easy
203 Remove Linked List Elements C++ Easy
200 Number of Islands C++ Medium
# Title Solution Difficulty
199 Binary Tree Right Side View C++ Medium
191 Number of 1 Bits C++ Easy
179 Largest Number C++ Medium
173 Binary Search Tree Iterator C++ Medium
170 Two Sum III - Data structure design C++ Easy
163 Missing Ranges C++ Medium
162 Find Peak Element C++ Medium
160 Intersection of Two Linked Lists C++ Easy
159 Longest Substring Which Contains 2 Unique Characters C++ Hard
155 Min Stack C++ Easy
152 Maximum Product Subarray C++ Medium
150 Evaluate Reverse Polish Notation C++ Medium
148 Sort List C++ Medium
147 Insertion Sort List C++ Medium
146 LRU Cache C++ Hard
145 Binary Tree Postorder Traversal C++ Hard
144 Binary Tree Preorder Traversal C++ Medium
143 Reorder List C++ Medium
142 Linked List Cycle II C++ Medium
141 Linked List Cycle C++ Medium
139 Word Break C++ Medium
134 Gas Station C++ Medium
132 Palindrome Partitioning II C++ Hard
131 Palindrome Partitioning C++ Medium
130 Surrounded Regions C++ Medium
129 Sum Root to Leaf Numbers C++ Medium
128 Longest Consecutive Sequence C++ Hard
127 Word Ladder C++ Medium
125 Valid Palindrome C++ Easy
123 Best Time to Buy and Sell Stock III C++ Hard
120 Triangle C++ Medium
119 Pascal's Triangle II C++ Easy
118 Pascal's Triangle C++ Easy
117 Populating Next Right Pointers in Each Node II C++ Hard
116 Populating Next Right Pointers in Each Node C++ Medium
115 Distinct Subsequences C++ Hard
113 Path Sum II C++ Medium
112 Path Sum C++ Easy
111 Minimum Depth of Binary Tree C++ Easy
108 Convert Sorted Array to Binary Search Tree C++ Easy
107 Binary Tree Level Order Traversal II C++ Easy
106 Construct Binary Tree from Inorder and Postorder Traversal C++ Medium
105 Construct Binary Tree from Preorder and Inorder Traversal C++ Medium
103 Binary Tree Zigzag Level Order Traversal C++ Medium
102 Binary Tree Level Order Traversal C++ Easy
101 Symmetric Tree C++ Easy
100 Same Tree C++ Easy
# Title Solution Difficulty
99 Recover Binary Search Tree C++ Hard
98 Validate Binary Search Tree C++ Medium
97 Interleaving String C++ Hard
95 Unique Binary Search Trees II C++ Medium
94 Binary Tree Inorder Traversal C++ Medium
93 Restore IP Addresses C++ Medium
92 Reverse Linked List II C++ Medium
91 Decode Ways C++ Medium
90 Subsets II C++ Medium
87 Scramble String C++ Hard
86 Partition List C++ Medium
85 Maximal Rectangle C++ Hard
83 Remove Duplicates from Sorted List C++ Easy
82 Remove Duplicates from Sorted List II C++ Medium
81 Search in Rotated Sorted Array II C++ Medium
80 Remove Duplicates from Sorted Array II C++ Medium
79 Word Search C++ Medium
78 Subsets C++ Medium
75 Sort Colors C++ Medium
74 Search a 2D Matrix C++ Medium
73 Set Matrix Zeroes C++ Medium
72 Edit Distance C++ Hard
71 Simplify Path C++ Medium
70 Climbing Stairs C++ Easy
67 Add Binary C++ Easy
66 Plus One C++ Easy
65 Valid Number C++ Easy
64 Minimum Path Sum C++ Medium
63 Unique Paths II C++ Medium
62 Unique Paths C++ Medium
61 Rotate List C++ Medium
60 Permutation Sequence C++ Medium
58 Length of Last Word C++ Easy
57 Insert Interval C++ Hard
56 Merge Intervals C++ Hard
54 Spiral Matrix C++ Medium
53 Maximum Subarray C++ Medium
48 Rotate Image C++ Medium
46 Permutations C++ Medium
45 Jump Game II C++ Hard
44 Wildcard Matching C++ Hard
42 Trapping Rain Water C++ Hard
41 First Missing Positive C++ Hard
40 Combination Sum II C++ Medium
39 Combination Sum C++ Medium
38 Count and Say C++ Easy
36 Valid Sudoku C++ Medium
35 Search Insert Position C++ Easy
34 Search for a Range C++ Medium
33 Search in Rotated Sorted Array C++ Hard
32 Longest Valid Parentheses C++ Hard
31 Next Permutation C++ Medium
30 Substring with Concatenation of All Words C++ Hard
27 Remove Element C++ Easy
26 Remove Duplicates from Sorted Array C++ Easy
25 Reverse Nodes in k-Group C++ Hard
24 Swap Nodes in Pairs C++ Medium
23 Merge k Sorted Lists C++ Hard
22 Generate Parentheses C++ Medium
21 Merge Two Sorted Lists C++ Easy
20 Valid Parentheses C++ Easy
19 Remove Nth Node From End of List C++ Easy
18 4Sum C++ Medium
17 Letter Combinations of a Phone Number C++ Medium
16 3Sum Closest C++ Medium
15 3Sum C++ Medium
14 Longest Common Prefix C++ Easy
13 Roman to Integer C++ Medium
11 Container With Most Water C++ Medium
10 Regular Expression Matching C++ Hard
9 Palindrome Number C++ Easy
7 Reverse Integer C++ Easy
6 ZigZag Conversion C++ Easy
5 Longest Palindromic Substring C++ Medium
4 Median of Two Sorted Arrays C++ Hard
3 Longest Substring Without Repeating Characters C++ Medium
2 Add Two Numbers C++ Medium
1 Two Sum C++ Medium

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages