/LeetCode

Solutions of problems from leetcode.com

Primary LanguagePython



Track of Daily Challenges

Year Jan Feb March April May June July Aug Sept Oct Nov Dec
2020 12/30 26/31 20/31 30/30 31/31 29/30 27/31
2021 25/31 28/28 31/31 20/31



Date problem-link solution
01/06/2020 Invert Binary Tree solution
02/06/2020 Delete Node in a Linked List solution
03/06/2020 solution
04/06/2020 Reverse String solution
05/06/2020 solution
06/06/2020 solution
07/06/2020 Coin Change 2 solution
08/06/2020 Power of Two solution
09/06/2020 Is Subsequence solution
10/06/2020 Search Insert Position solution
11/06/2020 Sort Colors solution
12/06/2020 solution
13/06/2020 solution
14/06/2020 solution
15/06/2020 Search in a Binary Search Tree solution
16/06/2020 Validate IP Address solution
17/06/2020 Surrounded Regions solution
18/06/2020 H-Index II solution
19/06/2020 solution
20/06/2020 solution
21/06/2020 solution
22/06/2020 solution
23/06/2020 solution
24/06/2020 solution
25/06/2020 solution
26/06/2020 solution
27/06/2020 solution
28/06/2020 solution
29/06/2020 solution
30/06/2020 solution



Date problem-link solution
01/06/2020 Arranging Coins solution
02/06/2020 Binary Tree Level Order Traversal II solution
03/06/2020 Prison Cells After N Days solution
04/06/2020 Ugly Number II solution
05/06/2020 Hamming Distance solution
06/06/2020 Plus One solution
07/06/2020 Island Perimeter solution
08/06/2020 3Sum solution
09/06/2020 Maximum Width of Binary Tree solution
10/06/2020 Flatten a Multilevel Doubly Linked List solution
11/06/2020 Subsets solution
12/06/2020 Reverse Bits solution
13/06/2020 Same Tree solution
14/06/2020 Angle Between Hands of a Clock solution
15/06/2020 Reverse Words in a String solution
16/06/2020 Pow(x, n) solution
17/06/2020 Top K Frequent Elements solution
18/06/2020 Course Schedule II solution
19/06/2020 Add Binary solution
20/06/2020 Remove Linked List Elements solution
21/06/2020 solution
22/06/2020 Binary Tree Zigzag Level Order Traversal solution
23/06/2020 Single Number III solution
24/06/2020 solution
25/06/2020 Find Minimum in Rotated Sorted Array II solution
26/06/2020 Add Digits solution
27/06/2020 solution
28/06/2020 Task Scheduler solution
29/06/2020 solution
30/06/2020 solution
31/06/2020 Climbing Stairs solution



Date problem-link solution
01/08/2020 Detect Capital solution
02/08/2020 Design HashSet solution
03/08/2020 Valid Palindrome solution
04/08/2020 Power of Four solution
05/08/2020 Add and Search Word - Data structure design solution
06/08/2020 Find All Duplicates in an Array solution
07/08/2020 Vertical Order Traversal of a Binary Tree solution
08/08/2020 solution
09/08/2020 solution
10/08/2020 Excel Sheet Column Number solution
11/08/2020 H-Index solution
12/08/2020 Pascal's Triangle II solution
13/08/2020 Iterator for Combination solution
14/08/2020 Longest Palindrome solution
15/08/2020 Non-overlapping Intervals solution
16/08/2020 Best Time to Buy and Sell Stock III solution
17/08/2020 Distribute Candies to People solution
18/08/2020 Numbers With Same Consecutive Differences solution
19/08/2020 Goat Latin solution
20/08/2020 Reorder List solution
21/08/2020 Sort Array By Parity solution
22/08/2020 solution
23/08/2020 solution
24/08/2020 solution
25/08/2020 solution
26/08/2020 Fizz Buzz solution
27/08/2020 solution
28/08/2020 solution
29/08/2020 solution
30/08/2020 solution
31/08/2020 Delete Node in a BST solution



Date problem-link solution
01/09/2020 Largest Time for Given Digits solution
02/09/2020 Contains Duplicate III solution
03/09/2020 Repeated Substring Pattern solution
04/09/2020 Partition Labels solution
05/09/2020 All Elements in Two Binary Search Trees solution
06/09/2020 Image Overlap solution
07/09/2020 Word Pattern solution
08/09/2020 Sum of Root To Leaf Binary Numbers solution
09/09/2020 Compare Version Numbers solution
10/09/2020 Bulls and Cows solution
11/09/2020 Maximum Product Subarray solution
12/09/2020 Combination Sum III solution
13/09/2020 Insert Interval solution
14/09/2020 House Robber solution
15/09/2020 Length of Last Word solution
16/09/2020 Maximum XOR of Two Numbers in an Array solution
17/09/2020 Robot Bounded In Circle solution
18/09/2020 Best Time to Buy and Sell Stock solution
19/09/2020 Sequential Digits solution
20/09/2020 Unique Paths III solution
21/09/2020 Car Pooling solution
22/09/2020 Majority Element II solution
23/09/2020 Gas Station solution
24/09/2020 Find the Difference solution
25/09/2020 Largest Number solution
26/09/2020 Teemo Attacking solution
27/09/2020 Evaluate Divison solution
28/09/2020 Subarray Product Less Than K solution
29/09/2020 Word Break solution
30/09/2020 First Missing Positive solution



Date problem-link solution
01/10/2020 Number of Recent Calls solution
02/10/2020 Combination Sum solution
03/10/2020 K-diff Pairs in an Array solution
04/10/2020 Remove Covered Intervals solution
05/10/2020 Complement of Base 10 Integer solution
06/10/2020 Insert into a Binary Search Tree solution
07/10/2020 Rotate List solution
08/10/2020 Binary Search solution
09/10/2020 Serialize and Deserialize BST solution
10/10/2020 Minimum Number of Arrows to Burst Balloons solution
11/10/2020 Remove Duplicate Letters solution
12/10/2020 Buddy Strings solution
13/10/2020 Sort List solution
14/10/2020 House Robber II solution
15/10/2020 Rotate Array solution
16/10/2020 Search a 2D Matrix solution
17/10/2020 Repeated DNA Sequences solution
18/10/2020 Best Time to Buy and Sell Stock IV solution
19/10/2020 Minimum Domino Rotations For Equal Row solution
20/10/2020 Clone Graph solution
21/10/2020 Asteroid Collision solution
22/10/2020 Minimum Depth of Binary Tree solution
23/10/2020 132 Pattern solution
24/10/2020 Bag of Tokens solution
25/10/2020 Stone Game IV solution
26/10/2020 Champagne Tower solution
27/10/2020 Linked List Cycle II solution
28/10/2020 Summary Ranges solution
29/10/2020 Maximize Distance to Closest Person solution
30/10/2020 Number of Longest Increasing Subsequence solution
31/10/2020 Recover Binary Search Tree solution



Date problem-link solution
01/11/2020 Convert Binary Number in a Linked List to Integer solution
02/11/2020 Insertion Sort List solution
03/11/2020 Consecutive Characters solution
04/11/2020 Minimum Height Trees solution
05/11/2020 Minimum Cost to Move Chips to The Same Position solution
06/11/2020 Find the Smallest Divisor Given a Threshold solution
07/11/2020 Add Two Numbers II solution
08/11/2020 Binary Tree Tilt solution
09/11/2020 Maximum Difference Between Node and Ancestor solution
10/11/2020 Flipping an Image solution
11/11/2020 Valid Square solution
12/11/2020 Permutations II solution
13/11/2020 Populating Next Right Pointers in Each Node solution
14/11/2020 Poor Pigs solution
15/11/2020 Range Sum of BST solution
16/11/2020 Longest Mountain in Array solution
17/11/2020 Mirror Reflection solution
18/11/2020 Merge Intervals solution
19/11/2020 Decode String solution
20/11/2020 Search in Rotated Sorted Array II solution
21/11/2020 Numbers At Most N Given Digit Set solution
22/11/2020 Unique Morse Code Words solution
23/11/2020 House Robber III solution
24/11/2020 Basic Calculator II solution
25/11/2020 Smallest Integer Divisible by K solution
26/11/2020 Longest Substring with At Least K Repeating Characters solution
27/11/2020 Partition Equal Subset Sum solution
28/11/2020 Sliding Window Maximum solution
29/11/2020 Jump Game III solution
30/11/2020 solution



Date problem-link solution
01/12/2020 Maximum Depth of Binary Tree solution
02/12/2020 Linked List Random Node solution
03/12/2020 Increasing Order Search Tree solution
04/12/2020 The kth Factor of n solution
05/12/2020 Can Place Flowers solution
06/12/2020 Populating Next Right Pointers in Each Node II.py solution
07/12/2020 Spiral Matrix II solution
08/12/2020 Pairs of Songs With Total Durations Divisible by 60 solution
09/12/2020 Binary Search Tree Iterator solution
10/12/2020 Valid Mountain Array solution
11/12/2020 Remove Duplicates from Sorted Array II solution
12/12/2020 Smallest Subtree with all the Deepest Nodes solution
13/12/2020 Burst Balloons solution
14/12/2020 solution
15/12/2020 Squares of a Sorted Array solution
16/12/2020 Validate Binary Search Tree solution
17/12/2020 4Sum II solution
18/12/2020 Increasing Triplet Subsequence solution
19/12/2020 solution
20/12/2020 solution
21/12/2020 Decoded String at Index solution
22/12/2020 Balanced Binary Tree solution
23/12/2020 Next Greater Element III solution
24/12/2020 Swap Nodes in Pairs solution
25/12/2020 Diagonal Traverse solution
26/12/2020 Decode Ways solution
27/12/2020 Jump Game IV solution
28/12/2020 Reach a Number solution
29/12/2020 solution
30/12/2020 Game of Life solution
31/12/2020 Largest Rectangle in Histogram solution



Date problem-link solution
01/01/2021 Check Array Formation Through Concatenation solution
02/01/2021 Find a Corresponding Node of a Binary Tree in a Clone of That Tree solution
03/01/2021 Beautiful Arrangement solution
04/01/2021 Merge Two Sorted Lists solution
05/01/2021 Remove Duplicates from Sorted List II solution
06/01/2021 Kth Missing Positive Number solution
07/01/2021 Longest Substring Without Repeating Characters solution
08/01/2021 Check If Two String Arrays are Equivalent solution
09/01/2021 Word Ladder solution
10/01/2021 Create Sorted Array through Instructions solution
11/01/2021 Merge Sorted Array solution
12/01/2021 Add Two Numbers solution
13/01/2021 Boats to Save People solution
14/01/2021 Minimum Operations to Reduce X to Zero solution
15/01/2021 Get Maximum in Generated Array solution
16/01/2021 Kth Largest Element in an Array solution
17/01/2021 Count Sorted Vowel Strings solution
18/01/2021 Max Number of K-Sum Pairs solution
19/01/2021 Longest Palindromic Substring solution
20/01/2021 Valid Parentheses solution
21/01/2021 Find the Most Competitive Subsequence solution
22/01/2021 Determine if Two Strings Are Close solution
23/01/2021 Sort the Matrix Diagonally solution
24/01/2021 Merge k Sorted Lists solution
25/01/2021 solution
26/01/2021 solution
27/01/2021 solution
28/01/2021 solution
29/01/2021 Vertical Order Traversal of a Binary Tree solution
30/01/2021 solution
31/01/2021 solution



Date problem-link solution
01/02/2021 Number of 1 Bits solution
02/02/2021 Trim a Binary Search Tree solution
03/02/2021 Linked List Cycle solution
04/02/2021 Longest Harmonious Subsequence solution
05/02/2021 Simplify Path solution
06/02/2021 Binary Tree Right Side View solution
07/02/2021 Shortest Distance to a Character solution
08/02/2021 Peeking Iterator solution
09/02/2021 Convert BST to Greater Tree solution
10/02/2021 Copy List with Random Pointer solution
11/02/2021 Valid Anagram solution
12/02/2021 Number of Steps to Reduce a Number to Zero solution
13/02/2021 Shortest Path in Binary Matrix solution
14/02/2021 Is Graph Bipartite? solution
15/02/2021 The K Weakest Rows in a Matrix solution
16/02/2021 Letter Case Permutation solution
17/02/2021 Container With Most Water solution
18/02/2021 Arithmetic Slices solution
19/02/2021 Minimum Remove to Make Valid Parentheses solution
20/02/2021 Roman to Integer solution
21/02/2021 Broken Calculator solution
22/02/2021 Longest Word in Dictionary through Deleting solution
23/02/2021 Search a 2D Matrix II solution
24/02/2021 Score of Parentheses solution
25/02/2021 Shortest Unsorted Continuous Subarray solution
26/02/2021 Validate Stack Sequences solution
27/02/2021 Divide Two Integers solution
28/02/2021 Maximum Frequency Stack solution



Date problem-link solution
01/03/2021 Distribute Candies solution
02/03/2021 Set Mismatch solution
03/03/2021 Missing Number solution
04/03/2021 Intersection of Two Linked Lists solution
05/03/2021 Average of Levels in Binary Tree solution
06/03/2021 Short Encoding of Words solution
07/03/2021 Design HashMap solution
08/03/2021 Remove Palindromic Subsequences solution
09/03/2021 Add One Row to Tree solution
10/03/2021 Integer to Roman solution
11/03/2021 Coin Change solution
12/03/2021 Check If a String Contains All Binary Codes of Size K solution
13/03/2021 Binary Trees With Factors solution
14/03/2021 Swapping Nodes in a Linked List solution
15/03/2021 Encode and Decode TinyURL solution
16/03/2021 Best Time to Buy and Sell Stock with Transaction Fee solution
17/03/2021 Generate Random Point in a Circle solution
18/03/2021 Wiggle Subsequence solution
19/03/2021 Keys and Rooms solution
20/03/2021 Design Underground System solution
21/03/2021 Reordered Power of 2 solution
22/03/2021 Vowel Spellchecker solution
23/03/2021 3Sum With Multiplicity solution
24/03/2021 Advantage Shuffle solution
25/03/2021 Pacific Atlantic Water Flow solution
26/03/2021 Word Subsets solution
27/03/2021 Palindromic Substrings solution
28/03/2021 Reconstruct Original Digits from English solution
29/03/2021 Flip Binary Tree To Match Preorder Traversal solution
30/03/2021 Russian Doll Envelopes solution
31/03/2021 Stamping The Sequence solution



Date problem-link solution
01/04/2021 Palindrome Linked List solution
02/04/2021 Ones and Zeroes solution
03/04/2021 Longest Valid Parentheses solution
04/04/2021 Design Circular Queue solution
05/04/2021 Global and Local Inversions solution
06/04/2021 Minimum Operations to Make Array Equal solution
07/04/2021 Determine if String Halves Are Alike solution
08/04/2021 Letter Combinations of a Phone Number solution
09/04/2021 Verifying an Alien Dictionary solution
10/04/2021 Longest Increasing Path in a Matrix solution
11/04/2021 Deepest Leaves Sum solution
12/04/2021 Beautiful Arrangement II solution
13/04/2021 Flatten Nested List Iterator solution
14/04/2021 Partition List solution
15/04/2021 Fibonacci Number solution
16/04/2021 Remove All Adjacent Duplicates in String II solution
17/04/2021 solution
18/04/2021 Remove Nth Node From End of List solution
19/04/2021 Combination Sum IV solution
20/04/2021 N-ary Tree Preorder Traversal solution
21/04/2021 Triangle solution
22/04/2021 solution
23/04/2021 solution
24/04/2021 solution
25/04/2021 solution
26/04/2021 solution
27/04/2021 Power of Three solution
28/04/2021 solution
29/04/2021 Find First and Last Position of Element in Sorted Array solution
30/04/2021 solution

icon credits

Icons made by Freepik from www.flaticon.com