Skip to content

khurd21/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

Welcome to my LeetCode Repo! Here I post all of my answers.

LeetCode Stats

Problems

# Title Solution Difficulty
1 Two Sum C++, Python Easy
2 Add Two Numbers C++, Medium
3 Longest Substring Without Repeating Characters C++, Medium
4 Median of Two Sorted Arrays C++, Hard
5 Longest Palindromic Substring C++, Medium
6 ZigZag Conversion C++, Medium
7 Reverse Integer C++, Medium
8 String to Integer (atoi) C++, Medium
9 Palindrome Number C++, Easy
11 Container With Most Water C++, Medium
12 Integer to Roman C++, Medium
24 Swap Nodes in Pairs C++, Medium
27 Remove Element C++, Easy
31 Next Permutation C++, Medium
36 Valid Sudoku C++, Medium
41 First Missing Positive C++, Hard
43 Multiply Strings C++, Medium
45 Jump Game 2 C++, Medium
49 Group Anagrams C++, Medium
55 Jump Game C++, Medium
58 Length of Last Word C++, Easy
72 Edit Distance C++, Hard
75 Sort Colors C++, Medium
79 Word Search C++, Medium
80 Remove duplicates from sorted array 2 C++, Hard
94 Binary Tree Inorder Traversal C++, Easy
110 Balanced Binary Tree C++, Easy
118 Pascal's Triangle C++, Easy
119 Pascal's Triangle 2 C++, Easy
128 Longest Consecutive Sequence C++, Medium
129 Sum Root to Leaf Numbers C++, Medium
141 Linked List Cycle C++, Easy
143 Reorder List C++, Medium
145 Binary Tree Postorder Traversal C++, Easy
165 Compare Version Numbers C++, Medium
167 Two Sum 2 - Input Array is Sorted C++, Medium
175 Combine Two Tables SQL, Easy
176 Second Highest Salary SQL, Easy
178 Rank Scores SQL, Medium
191 Number of 1 Bits C++, Easy
200 Number of Islands C++, Medium
205 Isomorphic Strings C++, Easy
217 Contains Duplicate C++, Easy
227 Basic Calculator C++, Medium
234 Palindrome Linked List C++, Easy
237 Delete Node in a Linked List C++, Medium
238 Product of Array Except Self C++, Medium
242 Valid Anagram C++, Easy
260 Single Number 3 C++, Medium
264 Ugly Number 2 C++, Medium
268 Missing Number C++, Easy
287 Find the Duplicate Number C++, Medium
330 Patching Array C++, Hard
344 Reverse String C++, Easy
347 First K Frequent Elements C++, Medium
349 Intersection of two Arrays C++, Easy
350 Intersection of Two Arrays 2 C++, Easy
365 Water and Jug Problem C++ , Medium
380 Insert, Delete, GetRandom O(1) C++ , Medium
387 First Unique Character in a String C++ , Easy
427 Construct Quad Tree C++ , Medium
432 All O'One Data Structure C++ , Hard
442 Find All Duplicates in an Array C++ , Medium
443 String Compression C++ , Medium
446 Arithmetic Slices 2 C++ , Hard
448 Find All Numbers Disappeared in an Array C++ , Easy
451 Sort Characters by Frequency C++ , Medium
452 Minimum Number of Arrows to Burst Balloons C++ , Medium
454 4 Sum II C++ , Medium
455 Assign Cookies C++ , Easy
463 Island Perimeter C++ , Easy
476 Number Complement C++ , Easy
485 Max Consecutive Ones C++ , Easy
506 Relative Ranks C++ , Easy
523 Continuous Subarray Sum C++ , Medium
525 Contiguous Array C++ , Medium
567 Permutation in String C++ , Medium
590 N-Ary Tree Postorder Traversal C++ , Easy
606 Construct String From Binary Tree C++ , Easy
621 Task Scheduler C++ , Medium
623 Add One Row to Tree C++ , Medium
633 Sum of Square Numbers C++ , Medium
648 Replace Words C++ , Medium
652 Find Duplicate Subtrees C++ , Medium
657 Robot Return to Origin C++ , Easy
661 Image Smoother C++ , Easy
690 Employee Importance C++ , Medium
703 Kth Largest Element in a Stream C++ , Easy
725 Split Linked List in Parts C++ , Medium
767 Reorganize String C++ , Medium
791 Custom Sort String C++, Medium
792 Number of Matching Subsequences C++, Medium
830 Positions of Large Groups C++, Easy
840 Magic Squares in Grid C++, Medium
860 Lemonade Change C++, Easy
867 Transpose Matrix C++, Easy
872 Leaf Similar Trees C++, Easy
876 Middle of the Linked List C++, Easy
881 Boats to Save People C++, Medium
912 Sort an Array C++, Medium
935 Knight Dialer C++, Medium
938 Range Sum of BST C++, Easy
945 Minimum Increment to Make Array Unique C++, Medium
948 Bag of Tokens C++, Medium
979 Distribute Coins in Binary Tree C++, Medium
988 Smallest String Starting From Leaf C++, Medium
992 Sub Arrays With K Different Integers C++, Hard
1054 Distant Barcodes C++, Medium
1035 Uncrossed Lines C++, Medium
1155 Number of Dice Rolls with Target Sum C++, Medium
1160 Find Words That Can Be Formed by Characters C++, Easy
1207 Unique Number of Occurrences C++, Easy
1249 Minimum Remove to Make Valid Parentheses C++, Medium
1266 Minimum Time Visiting All Points C++, Easy
1282 Group the People Given the Group Size They Belong To C++, Medium
1287 Elements Appearing More Than 25% In Sorted Array C++, Easy
1325 Delete Leaves With a Given Value C++, Medium
1331 Rank Transform of an Array C++, Easy
1367 Linked List in Binary Tree C++, Medium
1380 Lucky Numbers in a Matrix C++, Easy
1422 Maximum Score After Splitting a String C++, Easy
1424 Diagonal Traverse 2 C++, Medium
1436 Destination City C++, Easy
1457 Pseudo Palindromic Paths in a Binary Tree C++, Medium
1464 Maximum Product of Two Elements in an Array C++, Easy
1480 Running Sum of 1d Array C++, Easy
1492 The Kth Factor of N C++, Medium
1496 Path Crossing C++, Easy
1518 Water Bottles C++, Medium
1523 Count Odd Numbers in an Interval Range C++, Easy
1531 String Compression 2 C++, Hard
1544 Make the String Great C++, Medium
1550 Three Consecutive Odds C++, Easy
1552 Magnetic Force Between Two Balls C++, Medium
1561 Maximum Number of Coins You Can Get C++, Medium
1578 Minimum Time to Make Rope Colorful C++, Medium
1582 Special Positions in a Binary Matrix C++, Easy
1592 Rearrange Spaces Between Words Python , Easy
1598 Crawler Log Folder C++ , Easy
1611 Minimum One Bit Operations to Make Integers Zero C++ , Medium
1614 Maximum Depth of the Parentheses C++ , Easy
1624 Largest Substring Between Two Equal Characters C++ , Easy
1630 Arithmetic Sub Arrays C++ , Medium
1636 Sort Array by Increasing Frequency C++ , Easy
1637 Widest Vertical Area Between Two Points Containing No Points C++ , Medium
1662 Check If Two String Arrays are Equivalent C++ , Easy
1669 Merge in Between Linked Lists C++ , Medium
1684 Count the Number of Consistent Strings C++ , Easy
1685 Sum of Absolute Differences in a Sorted Array C++ , Medium
1688 Count of Matches in Tournament C++ , Easy
1701 Average Waiting Time C++ , Medium
1716 Calculate Money in Leetcode Bank C++ , Easy
1717 Maximum Score From Removing Substrings C++ , Medium
1727 Largest Sub-Matrix with Re-arrangements C++ , Medium
1754 Largest Merge Of Two Strings C++ , Medium
1758 Minimum Changes To Make Alternating Binary String C++ , Easy
1791 Find Center of Star Graph C++ , Easy
1800 Maximum Ascending Sub Array Sum C++ , Easy
1812 Determine Color of a Chessboard Square C++, Easy
1814 Count Nice Pairs in Array C++, Medium
1832 Check if the Sentence Is Pangram C++, Easy
1838 Frequency of the Most Frequent Element C++, Medium
1877 Minimize Maximum Pair Sum in Array C++, Medium
1887 Reduction Operations to Make the Array Elements Equal C++, Medium
1897 Redistribute Characters To Make All Strings Equal C++, Easy
1903 Largest Odd Number in String C++, Easy
1905 Count Sub Islands C++, Medium
1913 Maximum Product Difference Between Two Pairs C++, Easy
1930 Unique Length of 3 Palindromic Subsequence C++, Medium
1962 Remove Stones to Minimize the Total C++, Medium
1980 Find Unique Binary String C++, Medium
2000 Reverse Prefix of Word C++, Easy
2037 Minimum Number of Moves to Seat Everyone C++, Easy
2058 Find the Minimum and Maximum Number of Nodes Between Critical Points C++, Medium
2073 Time Needed to Buy Tickets C++, Easy
2125 Number of Laser Beams in a Bank C++, Medium
2133 Check if Every Row and Column Contains All Numbers C++, Easy
2147 Number of Ways to Divide a Long Corridor C++, Hard
2191 Sort the Jumbled Numbers C++, Medium
2196 Create Binary Tree From Descriptions C++, Medium
2220 Minimum Bit Flips to Convert Number C++, Easy
2264 Largest 3 Same Digit Number in String C++, Easy
2285 Maximum Total Importance of Roads C++, Medium
2309 Greatest English Letter in Upper and Lower Case C++, Easy
2331 Evaluate Boolean Binary Tree C++, Easy
2360 Longest Cycle in a Graph C++, Hard
2353 Design a Food Rating System C++, Medium
2363 Merge Similar Items C++, Easy
2373 Largest Local Values in a Matrix C++, Easy
2391 Minimum Amount of Time to Collect Garbage C++, Medium
2405 Optimal Partition of String C++, Medium
2418 Sort the People C++, Easy
2441 Largest Positive Integer that Exists with its Negative C++, Easy
2444 Count Subarrays With Fixed Bounds C++, Hard
2482 Difference Between Ones and Zeros in Row and Column C++, Medium
2485 Find the Pivot Integer C++, Easy
2486 Append Characters to String to Make Subsequence C++, Medium
2491 Divide Players into Teams of Equal Skill C++, Medium
2540 Minimum Common Value C++, Easy
2582 Pass the Pillow C++, Easy
2610 Convert an Array Into a 2D Array With Conditions C++, Medium
2657 Find the Prefix Common Array of Two Arrays C++, Medium
2678 Number of Senior Citizens C++, Easy
2706 Buy Two Chocolates C++, Easy
2751 Robot Collisions C++, Hard
2785 Sort Vowels in a String C++, Medium
2816 Double a Number Represented as a Linked List C++, Medium
2864 Maximum Odd Binary Number C++, Easy
2870 Minimum Number of Operations to Make Array Empty C++, Medium
2958 Length of Longest Subarray With at Most K Frequency C++, Medium
2997 Minimum Number of Operations to Make Array XOR Equal to K C++, Medium
3005 Count Elements With Maximum Frequency C++, Easy
3016 Minimum Number of Pushes to Type Word 2 C++, Medium
3075 Maximize Happiness of Selected Children C++, Medium
3217 Delete Nodes From Linked List Present in Array C++, Medium

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published