Solved problems from daily LeetCoding challenges with basic tests from LeetCode problem descriptions. Starting from the 1st of March, 2021.
Levels:
- 🟢 Easy
- 🟡 Medium
- 🔴 Hard
Hashing/lookups:
- 🟢 problem 1 / Two Sum
- 🟡 problem 36 / Valid Sudoku
- 🟡 problem 49 / Group Anagrams
- 🟡 problem 128 / Longest Consecutive Sequence
- 🟡 problem 423 / Reconstruct Original Digits from English
- 🟡 problem 535 / Encode and Decode TinyURL
- 🟡 problem 554 / Brick Wall
- 🟢 problem 575 / Distribute Candies
- 🟡 problem 609 / Find Duplicate File in System
- 🟢 problem 645 / Set Mismatch
- 🟢 problem 706 / Design HashMap
- 🟡 problem 729 / My Calendar I
- 🟡 problem 791 / Custom Sort String
- 🟢 problem 859 / Buddy Strings
- 🟡 problem 869 / Reordered Power of 2
- 🟡 problem 870 / Advantage Shuffle
- 🟡 problem 877 / Stone Game
- 🟡 problem 890 / Find and Replace Pattern
- 🟡 problem 916 / Ward Subsets
- 🟡 problem 923 / 3Sum With Multiplicity
- 🟢 problem 953 / Verifying an Alien Dictionary
- 🟡 problem 966 / Vowel Spellchecker
- 🟡 problem 1396 / Design Underground System
- 🟢 problem 1704 / Determine if String Halves Are Alike
Arrays:
- 🟡 problem 18 / 4Sum
- 🟡 problem 34 / Find First and Last Position of Element in Sorted Array
- 🟡 problem 45 / Jump Game II
- 🟡 problem 73 / Set Matrix Zeroes
- 🟡 problem 162 / Find Peak Element
- 🟢 problem 303 / Range Sum Query - Immutable
- 🔴 problem 363 / Max Sum of Rectangle No Larger Than K
- 🟢 problem 566 / Reshape the Matrix
- 🟡 problem 611 / Valid Triangle Number
- 🔴 problem 630 / Course Schedule III
- 🟡 problem 658 / Find K Closest Elements
- 🟡 problem 665 / Non-decreasing Array
- 🟡 problem 795 / Number of Subarrays with Bounded Maximum
- 🟡 problem 838 / Push Dominoes
- 🟡 problem 915 / Partition Array into Disjoint Intervals
- 🔴 problem 927 / Three Equal Parts
- 🟡 problem 954 / Array of Doubled Pairs
- 🔴 problem 1354 / Construct Target Array With Multiple Sums
- 🟡 problem 1423 / Maximum Points You Can Obtain from Cards
- 🟡 problem 1465 / Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts
- 🟢 problem 1480 / Running Sum of 1d Array
- 🟡 problem 1695 / Maximum Erasure Value
Lists:
- 🟡 problem 19 / Remove Nth Node From End of List
- 🔴 problem 25 / Reverse Nodes in k-Group
- 🟡 problem 86 / Partition List
- 🟡 problem 92 / Reverse Linked List II
- 🟢 problem 160 / Intersection of Two Linked Lists
- 🟢 problem 234 / Palindrome Linked List
- 🟡 problem 341 / Flatten Nested List Iterator
- 🟡 problem 1721 / Swapping Nodes in a Linked List
Stacks:
Trees:
- 🟡 problem 102 / Binary Tree Level Order Traversal
- 🟡 problem 105 / Construct Binary Tree from Preorder and Inorder Traversal
- 🟡 problem 109 / Convert Sorted List to Binary Search Tree
- 🟡 problem 113 / Path Sum II
- 🟡 problem 114 / Flatten Binary Tree to Linked List
- 🟢 problem 235 / Lowest Common Ancestor of a Binary Search Tree
- 🟡 problem 236 / Lowest Common Ancestor of a Binary Tree
- 🟡 problem 307 / Range Sum Query - Mutable
- 🔴 problem 315 / Count of Smaller Numbers After Self
- 🔴 problem 336 / Palindrome Pairs
- 🟡 problem 429 / N-ary Tree Level Order Traversal
- 🟢 problem 589 / N-ary Tree Preorder Traversal
- 🟡 problem 632 / Add One Row to Tree
- 🟢 problem 637 / Average of Levels in Binary Tree
- 🟢 problem 653 / Two Sum IV - Input is a BST
- 🔴 problem 745 / Prefix and Suffix Search
- 🟡 problem 814 / Binary Tree Pruning
- 🟡 problem 820 / Short Encoding of Words
- 🔴 problem 968 / Binary Tree Cameras
- 🟡 problem 971 / Flip Binary Tree To Match Preorder Traversal
- 🟡 problem 1302 / Deepest Leaves Sum
- 🟡 problem 1339 / Maximum Product of Splitted Binary Tree
- 🟡 problem 1448 / Count Good Nodes in Binary Tree
Graphs:
- 🟡 problem 63 / Unique Paths II
- 🔴 problem 329 / Longest Increasing Path in a Matrix
- 🟡 problem 378 / Kth Smallest Element in a Sorted Matrix
- 🟡 problem 417 / Pacific Atlantic Water Flow
- 🟡 problem 565 / Array Nesting
- 🟡 problem 684 / Redundant Connection
- 🟡 problem 695 / Max Area Of Island
- 🟡 problem 742 / Open the Lock
- 🔴 problem 778 / Swim in Rising Water
- 🔴 problem 827 / Making A Large Island
- 🟡 problem 841 / Keys and Rooms
- 🔴 problem 1632 / Rank Transform of a Matrix
Recursion:
- 🟡 problem 17 / Letter Combinations of a Phone Number
- 🟡 problem 95 / Unique Binary Search Trees II
- 🟡 problem 120 / Triangle
- 🟡 problem 473 / Matchsticks to Square
Dynamic programming:
- 🟡 problem 91 / Decode Ways
- 🔴 problem 132 / Palindrome Partitioning II
- 🟡 problem 304 / Range Sum Query 2D - Immutable
- 🟡 problem 322 / Coin Change
- 🟡 problem 377 / Combination Sum IV
- 🟡 problem 474 / Ones And Zeroes
- 🟡 problem 576 / Out of Boundary Paths
- 🟡 problem 583 / Delete Operation for Two Strings
- 🔴 problem 629 / K Inverse Pairs Array
- 🔴 problem 639 / Decode Ways II
- 🟡 problem 714 / Best Time to Buy and Sell Stock with Transaction Fee
- 🟡 problem 718 / Maximum Length of Repeated Subarray
- 🟢 problem 746 / Min Cost Climbing Stairs
- 🟡 problem 832 / Binary Trees With Factors
- 🔴 problem 1220 / Count Vowels Permutation
- 🟡 problem 1690 / Stone Game VII
Greedy:
- 🔴 problem 135 / Candy
- 🔴 problem 871 / Minimum Number of Refueling Stops
- 🟡 problem 1338 / Reduce Array Size to The Half
- 🔴 problem 1383 / Maximum Performance of a Team
- 🟢 problem 1710 / Maximum Units on a Truck
Misc/Sequences:
- 🟡 problem 12 / Integer to Roman
- 🔴 problem 32 / Longest Valid Parentheses
- 🟡 problem 48 / Rotate Image
- 🟡 problem 97 / Interleaving String
- 🟢 problem 118 / Pascal's Triangle
- 🟢 problem 205 / Isomorphic Strings
- 🟢 problem 268 / Missing Number
- 🔴 problem 295 / Find Median from Data Stream
- 🟡 problem 300 / Longest Increasing Subsequence
- 🔴 problem 354 / Russian Doll Envelopes
- 🟡 problem 376 / Wiggle Subsequence
- 🟢 problem 415 / Add Strings
- 🟡 problem 478 / Generate Random Point in a Circle
- 🟢 problem 509 / Fibonacci Number
- 🟡 problem 647 / Palindromic Substrings
- 🟡 problem 667 / Beautiful Arrangement II
- 🟢 problem 696 / Count Binary Substrings
- 🟢 problem 709 / To Lower Case
- 🟡 problem 775 / Global and Local Inversions
- 🟡 problem 792 / Number of Matching Subsequences
- 🟡 problem 816 / Ambiguous Coordinates
- 🟡 problem 926 / Flip String to Monotone Increasing
- 🟡 problem 970 / Powerful Integers
- 🟡 problem 1004 / Max Consecutive Ones III
- 🟢 problem 1047 / Remove All Adjacent Duplicates In String
- 🟡 problem 1048 / Longest String Chain
- 🟡 problem 1209 / Remove All Adjacent Duplicates in String II
- 🟢 problem 1332 / Remove Palindromic Subsequences
- 🟡 problem 1461 / Check If a String Contains All Binary Codes of Size K
- 🟡 problem 1551 / Minimum Operations to Make Array Equal
- 🟡 problem 1642 / Furthest Building You Can Reach
- 🟡 problem 1689 / Partitioning Into Minimum Number Of Deci-Binary Numbers
- 🟡 problem 1696 / Jump Game VI
Other data structures:
Maths:
- 🟡 problem 89 / Gray Code
- 🟢 problem 204 / Count Primes
- 🟢 problem 326 / Power Of Three
- 🟡 problem 384 / Shuffle an Array
- 🟡 problem 462 / Minimum Moves to Equal Array Elements II
- 🟡 problem 537 / Complex Number Multiplication
- 🔴 problem 906 / Super Palindromes
Backtracking:
- 🟡 problem 22 / Generate Parentheses
- 🔴 problem 37 / Sudoku Solver
- 🔴 problem 51 / N-Queens
- 🔴 problem 52 / N-Queens II
- 🟡 problem 90 / Subsets II
State machines:
Bit manipulation: