leetcode
My Solutions for LeetCode Challenges
Top 150
Array / String
- Merge Sorted Array
- Remove Element
- Remove Duplicates from Sorted Array
- Remove Duplicates from Sorted Array II
- Majority Element
- Rotate Array
- Best Time to Buy and Sell Stock
- Best Time to Buy and Sell Stock II
- Jump Game
- Jump Game II
- H-Index
- Insert Delete GetRandom O(1)
- Product of Array Except Self
- Gas Station
- Candy
- Trapping Rain Water
- Roman to Integer
- Integer to Roman
- Length of Last Word
- Longest Common Prefix
- Reverse Words in a String
- Zigzag Conversion
- Find the Index of the First Occurrence in a String
- Text Justification
Two Pointers
- Valid Palindrome
- Is Subsequence
- Two Sum II - Input Array Is Sorted
- Container With Most Water
- 3Sum
Sliding Window
- Minimum Size Subarray Sum
- Longest Substring Without Repeating Characters
Matrix
- Rotate Image
- Valid Sudoku
Hashmap
- Ransom Note
- Isomorphic Strings
- Word Pattern
- Two Sum
- Valid Anagram
- Group Anagrams
- Contains Duplicate II
Intervals
- Summary Ranges
- Merge Intervals
- Insert Interval
- Minimum Number of Arrows to Burst Balloons
Stack
- Valid Parentheses
- Simplify Path
- Min Stack
- Evaluate Reverse Polish Notation
- Basic Calculator
Linked List
- Linked List Cycle
- Swap Pairs ***
- Add Two Numbers
- Merge Two Sorted Lists
- Copy List with Random Pointer
- Reverse Linked List II
- Reverse Nodes in k-Group
- Remove Nth Node From End of List
- Remove Duplicates from Sorted List II
- Rotate List
- Partition List
- LRU Cache
Binary Tree General
- Maximum Depth of Binary Tree
- Same Tree
- Invert Binary Tree
- Symmetric Tree
- ...
Binary Tree BFS
- Average of Levels in Binary Tree
- ...
Binary Search Tree
- Minimum Absolute Difference in BST
- ...
Graph General
- Number of Islands
- Surrounded Regions
- Clone Graph
- Evaluate Division
- Course Schedule
- Course Schedule II ...
Graph BFS
- Snakes and Ladders
- Minimum Genetic Mutation
- Word Ladder
Trie
...
Backtracking
...
Divide & Conquer
- Convert Sorted Array to Binary Search Tree
- ...
Kadane's Algorithm
- Maximum Subarray
- Maximum Sum Circular Subarray
Binary Search
- Search Insert Position
- ...
Binary Search
- Search Insert Position
- ...
Heap
...
Bit Manipulation
- Add Binary
- Reverse Bits
- Number of 1 Bits
- Single Number
- ...
Math
- Palindrome Number
- Plus One
- Sqrt(x)
- ...
1D DP
- Climbing Stairs
- House Robber
- Word Break
- Coin Change
- Longest Increasing Subsequence
Multidimensional DP
...