LeetCode
Problems and Solutions
- 1-bit and 2-bit Characters
- 3Sum Closest
- 3Sum
- 4Sum
- Add Binary
- Add Digits
- Add to Array-Form of Integer
- Alternating Digit Sum
- Apply Operations to an Array
- Array Partition I
- Assign Cookies
- Asteroid Collision
- Balanced Binary Tree
- Base 7
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock
- Binary Gap
- Binary Number with Alternating Bits
- Binary Prefix Divisible by 5
- Binary Search
- Binary Tree Inorder Traversal
- Binary Tree Paths
- Binary Tree Postorder Traversal
- Binary Tree Preorder Traversal
- Binary Tree Tilt
- Buddy Strings
- Can Place Flowers
- Check if Array is Sorted and Rotated
- Check if Matrix is X-Matrix
- Check if N and its Double Exist
- Circular Sentence
- Climbing Stairs
- Combinations
- Complement of Base 10 Integer
- Construct String from Binary Tree
- Construct the Rectangle
- Container with Most Water
- Contains Duplicate II
- Contains Duplicate
- Convert a Number to Hexadecimal
- Convert Sorted Array to Binary Search Tree
- Convert the Temperature
- Count Binary Substrings
- Count Negative Numbers in a Sorted Matrix
- Count Pairs of Similar Strings
- Count Primes
- Counting Bits
- Cousins in Binary Tree
- Day of the Week
- Day of the Year
- Defanging an IP Address
- Degree of an Array
- Delete Node in a Linked List
- Detect Capital
- DI String Match
- Diameter of Binary Tree
- Difference between Element Sum and Digit Sum of an Array
- Distance between Bus Stops
- Distribute Candies
- Duplicate Zeros
- Excel Sheet Column Number
- Excel Sheet Column Title
- Factorial Trailing Zeroes
- Fibonacci Number
- Find All Anagrams in a String
- Find All Numbers Disappeared in an Array
- Find Common Characters
- Find Lucky Integer in an Array
- Find N Unique Integers Sum up to Zero
- Find Pivot Index
- Find Smallest Letter Greater Than Target
- Find the Difference
- Find the Duplicate Number
- Find the Pivot Integer
- Find the Town Judge
- First Bad Version
- First Missing Positive
- First Unique Character in a String
- Fizz Buzz
- Flipping an Image
- Flood Fill
- Generate Parentheses
- Greatest Common Divisor of Strings
- Group Anagrams
- Guess Number Higher or Lower
- Hamming Distance
- Happy Number
- Image Smoother
- Implement strstr
- Increasing Decreasing String
- Increasing Order Search Tree
- Insert Interval
- Intersection of Two Arrays II
- Intersection of Two Arrays
- Intersection of Two Linked Lists
- Invert Binary Tree
- Is Subsequence
- Island Perimeter
- Isomorphic Strings
- Kth Largest Element in a Stream
- Kth Missing Positive Number
- Largest Number at Least Twice of Others
- Largest Perimeter Triangle
- Largest Triangle Area
- Leaf-Similar Trees
- Length of Last Word
- Letter Combinations of a Phone Number
- License Key Formatting
- Linked List Cycle
- Longest Common Prefix
- Longest Nice Substring
- Longest Palindrome
- Longest Palindromic Substring
- Longest Repeating Character Replacement
- Longest Substring without Repeating Characters
- Lowest Common Ancestor of a Binary Search Tree
- Lucky Numbers in a Matrix
- Majority Element
- Matrix Diagonal Sum
- Max Consecutive Ones
- Maximize Sum of Array after K Negations
- Maximum Count of Positive Integer and Negative Integer
- Maximum Depth of Binary Tree
- Maximum Depth of N-ary Tree
- Maximum Number of Balloons
- Maximum Product Subarray
- Maximum Subarray
- Merge Intervals
- Merge Sorted Array
- Merge Two Sorted Lists
- Middle of the Linked List
- Min Cost Climbing Stairs
- Min Stack
- Minimum Absolute Difference in BST
- Minimum Absolute Difference
- Minimum Common Value
- Minimum Cuts to Divide a Circle
- Minimum Depth of Binary Tree
- Minimum Distance Between BST Nodes
- Minimum Index Sum of Two Lists
- Minimum Subsequence in Non-Increasing Order
- Minimum Window Substring
- Missing Number
- Monotonic Array
- Most Common Word
- Move Zeroes
- N-ary Tree Postorder Traversal
- N-ary Tree Preorder Traversal
- N-Repeated Element in Size 2N Array
- N-th Tribonacci Number
- Nim Game
- Non-overlapping Intervals
- Number Complement
- Number of 1 Bits
- Number of Distinct Averages
- Number of Equivalent Domino Pairs
- Number of Unequal Triplets in Array
- Palindrome Number
- Partition Array into Three Parts with Equal Sum
- Pascal's Triangle II
- Pascal's Triangle
- Path Sum
- Peak Index in a Mountain Array
- Perfect Number
- Perfect Squares
- Permutations
- Plus One
- Positions of Large Groups
- Power of Four
- Power of Three
- Power of Two
- Prime Arrangements
- Print in Order
- Product of Array Except Self
- Range Addition II
- Range Sum of BST
- Range Sum Query Immutable
- Ransom Note
- Rectangle Overlap
- Relative Sort Array
- Remove All Adjacent Duplicates in String II
- Remove All Adjacent Duplicates in String
- Remove Duplicates from Sorted Array
- Remove Duplicates from Sorted List
- Remove Element
- Remove Letter to Equalize Frequency
- Remove Linked List Elements
- Remove Outermost Parentheses
- Reshape the Matrix
- Reverse Bits
- Reverse Integer
- Reverse Linked List
- Reverse Only Letters
- Reverse String II
- Reverse String
- Reverse Vowels of a String
- Reverse Words in a String III
- Robot Return to Origin
- Roman to Integer
- Rotate String
- Same Tree
- Search a 2D Matrix
- Search in a Binary Search Tree
- Search in Rotated Sorted Array
- Search Insert Position
- Set Matrix Zeroes
- Set Mismatch
- Shortest Distance to a Character
- Single Number
- Sliding Window Maximum
- Smallest Range I
- Sort Array by Parity II
- Sort Array by Parity
- Sort Integers by the Number of 1 Bits
- Spiral Matrix
- Split a String in Balanced Strings
- sqrt(x)
- Squares of a Sorted Array
- String Matching in an Array
- Subsets II
- Subsets
- Subtree of Another Tree
- Sum of Left Leaves
- Sum of Root to Leaf Binary Numbers
- Sum of Square Numbers
- Summary Ranges
- Symmetric Tree
- Third Maximum Number
- Thousand Separator
- Three Consecutive Odds
- To Lower Case
- Toeplitz Matrix
- Transpose Matrix
- Two Sum II
- Two Sum IV - Input is a BST
- Two Sum
- Ugly Number
- Unique Morse Code Words
- Unique Number of Occurrences
- Univalued Binary Tree
- Valid Anagram
- Valid Boomerang
- Valid Mountain Array
- Valid Palindrome
- Valid Parentheses
- Valid Perfect Square
- Word Pattern