Skip to content

amanbhala/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode solutions

# Title Solution Difficulty
1 Two Sum C++ Easy
17 Letter Combinations of a Phone Number C++ Medium
20 Valid Parentheses C++ Easy
21 Merge Two Sorted Lists C++ Easy
22 Generate Parentheses C++ Medium
24 Swap Nodes in Pairs C++ Medium
30 Substring with Concatenation of All Words C++ Hard
36 Valid Sudoku C++ Medium
41 First Missing Positive C++ Hard
53 Maximum Subarray C++ Medium
54 Spiral Matrix C++ Medium
59 Spiral Matrix II C++ Medium
62 Unique Paths C++ Medium
66 Plus One C++ Easy
70 Climbing Stairs C++ Easy
73 Set Matrix Zeroes C++ Medium
75 Sort Colors C++ Medium
94 Binary Tree Inorder Traversal C++ Easy
98 Validate Binary Search Tree C++ Medium
101 Symmetric Tree C++ Easy
102 Binary Tree Level Order Traversal C++ Medium
104 Maximum Depth of Binary Tree C++ Easy
105 Construct Binary Tree from Preorder and Inorder Traversal C++ Medium
106 Construct Binary Tree from Inorder and Postorder Traversal C++ Medium
108 Convert Sorted Array to Binary Search Tree C++ Easy
110 Balanced Binary Tree C++ Easy
112 Path Sum C++ Easy
116 Populating Next Right Pointers in Each Node C++ Medium
119 Pascal's Triangle II C++ Easy
121 Best Time to Buy and Sell Stock C++ Easy
122 Best Time to Buy and Sell Stock II C++ Medium
125 Valid Palindrome C++ Easy
128 Longest Consecutive Sequence C++ Medium
130 Surrounded Regions C++ Medium
134 Gas Station C++ Medium
137 Single Number II C++ Medium
138 Copy List with Random Pointer C++ Medium
142 Linked List Cycle II C++ Medium
144 Binary Tree Preorder Traversal C++ Easy
145 Binary Tree Postorder Traversal C++ Easy
148 Sort List C++ Medium
150 Evaluate Reverse Polish Notation C++ Medium
152 Maximum Product Subarray C++ Medium
162 Find Peak Element C++ Medium
172 Factorial Trailing Zeroes C++ Medium
179 Largest Number C++ Medium
189 Rotate Array C++ Medium
198 House Robber C++ Medium
200 Number of Islands C++ Medium
204 Count Primes C++ Medium
205 Isomorphic Strings C++ Easy
206 Reverse Linked List C++ Easy
209 Minimum Size Subarray Sum C++ Medium
226 Invert Binary Tree C++ Easy
228 Summary Ranges C++ Easy
235 Lowest Common Ancestor of a Binary Search Tree C++ Medium
278 First Bad Version C++ Easy
299 Bulls and Cows C++ Medium
338 Counting Bits C++ Easy
347 Top K Frequent Elements C++ Medium
384 Shuffle an Array C++ Medium
392 Is Subsequence C++ Easy
399 Evaluate Division C++ Medium
409 Longest Palindrome C++ Easy
424 Longest Repeating Character Replacement C++ Medium
438 Find All Anagrams in a String C++ Medium
454 4Sum II C++ Medium
509 Fibonacci Number C++ Easy
530 Minimum Absolute Difference in BST C++ Easy
535 Encode and Decode TinyURL C++ Medium
547 umber of Provinces C++ Medium
559 Maximum Depth of N-ary Tree C++ Easy
589 N-ary Tree Preorder Traversal C++ Easy
590 N-ary Tree Postorder Traversal C++ Easy
606 Construct String from Binary Tree C++ Easy
617 Merge Two Binary Trees C++ Easy
637 Average of Levels in Binary Tree C++ Easy
649 Dota2 Senate C++ Medium
692 Top K Frequent Words C++ Medium
700 Search in a Binary Search Tree C++ Easy
703 Kth Largest Element in a Stream C++ Easy
704 Binary Search C++ Easy
724 Find Pivot Index C++ Easy
733 Flood Fill C++ Easy
746 Min Cost Climbing Stairs C++ Easy
784 Letter Case Permutation C++ Medium
785 Is Graph Bipartite? C++ Medium
779 K-th Symbol in Grammar C++ Medium
844 Backspace String Compare C++ Easy
876 Middle of the Linked List C++ Medium
872 Leaf-Similar Trees C++ Easy
897 Increasing Order Search Tree C++ Easy
938 Range Sum of BST C++ Easy
949 Largest Time for Given Digits C++ Easy
1022 Sum of Root To Leaf Binary Numbers C++ Easy
1025 Divisor Game C++ Easy
1035 Uncrossed Lines C++ Medium
1046 Last Stone Weight C++ Easy
1091 Shortest Path in Binary Matrix C++ Medium
1137 N-th Tribonacci Number C++ Easy
1146 Snapshot Array C++ Medium
1161 Maximum Level Sum of a Binary Tree C++ Medium
1232 Check If It Is a Straight Line C++ Easy
1302 Deepest Leaves Sum C++ Medium
1318 Minimum Flips to Make a OR b Equal to c C++ Medium
1343 Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold C++ Medium
1365 How Many Numbers Are Smaller Than the Current Number C++ Easy
1376 Time Needed to Inform All Employees C++ Medium
1379 Find a Corresponding Node of a Binary Tree in a Clone of That Tree C++ Easy
1456 Maximum Number of Vowels in a Substring of Given Length C++ Medium
1464 Maximum Product of Two Elements in an Array C++ Medium
1480 Running Sum of 1d Array C++ Easy
1491 Average Salary Excluding the Minimum and Maximum Salary C++ Easy
1492 The kth Factor of n C++ Medium
1493 Longest Subarray of 1's After Deleting One Element C++ Medium
1498 Number of Subsequences That Satisfy the Given Sum Condition C++ Medium
1509 Minimum Difference Between Largest and Smallest Value in Three Moves C++ Medium
1512 Number of Good Pairs C++ Easy
1525 Number of Good Ways to Split a String C++ Medium
1557 Minimum Number of Vertices to Reach All Nodes C++ Medium
1572 Matrix Diagonal Sum C++ Easy
1647 Minimum Deletions to Make Character Frequencies Unique C++ Medium
1802 Maximum Value at a Given Index in a Bounded Array C++ Medium
1964 Find the Longest Valid Obstacle Course at Each Position C++ Hard
1970 Last Day Where You Can Still Cross C++ Hard
2024 Maximize the Confusion of an Exam C++ Medium
2101 Detonate the Maximum Bombs C++ Medium
2109 Adding Spaces to a String C++ Medium
2130 Maximum Twin Sum of a Linked List C++ Medium
2140 Solving Questions With Brainpower C++ Medium
2215 Find the Difference of Two Arrays C++ Easy
2305 Fair Distribution of Cookies C++ Medium
2331 Evaluate Boolean Binary Tree C++ Easy
2352 Equal Row and Column Pairs C++ Medium
2405 Optimal Partition of String C++ Medium
2462 Total Cost to Hire K Workers C++ Medium
2466 Count Ways To Build Good Strings C++ Medium
2542 Maximum Subsequence Score C++ Medium
2551 Put Marbles in Bags C++ Medium
2610 Convert an Array Into a 2D Array With Conditions C++ Medium
2734 Lexicographically Smallest String After Substring Operation C++ Medium

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages