My accepted leetcode solutions to some of the common interview problems.
- Pascals Traiangle II (Easy)
- Product Of Array Except Self (Medium)
- Rotate Matrix (Medium)
- Set Matrix Zeroes (Medium)
- Third Maximum Number (Easy)
- Two Sum (Easy)
- TwoSum II (Easy)
- Can Place Flowers (Easy)
- Merge Intervals (Medium)
- First Missing Positive (Hard)
- Fruit Into Baskets (Medium)
- MaxProduct Of Three Numbers (Easy)
- Missing Number (Easy)
- Merge Sorted Array (Easy)
- Rotate Array (Easy)
- Sort Colors (Medium)
- Battleships in a Board (Medium)
- Find the Celebrity (Medium)
- Meeting Rooms (Easy)
- Longest Continuous Increasing Subsequence (Easy)
- Sparse Matrix Multiplication (Medium)
- Read N Characters Given Read4 (Easy)
- Maximum Swap (Medium)
- H-Index (Medium)
- Insert Interval (Hard)
- Increasing Triplet Subsequence (Medium)
- K Empty Slots (Hard)
- Subarray Sum Equals K (Medium)
- Pour Water (Medium)
- Relative Ranks (Easy)
- Next Greater Element I (Easy)
- Largest Number At Least Twice of Others (Easy)
- Minimum Moves to Equal Array Elements II (Median)
- Image Smoother (Easy)
- Minimum Index Sum of Two Lists (Easy)
- Card Flipping Game (Medium)
- Employee Free Time (Hard)
- Best Meeting Point (Hard)
- My Calendar III (Hard)
- Champagne Tower (Medium)
- Valid Tic-Tac-Toe State (Medium)
- Number of Subarrays with Bounded Maximum (Medium)
- Combinations (Medium)
- Combinations Sum (Medium)
- Combinations Sum II (Medium)
- Letter Phone Number (Medium)
- Paliandrome Partitioning (Medium)
- Permutations (Medium)
- Permutations II (Medium)
- SubSets (Medium)
- SubSet II (Medium)
- Word Search (Medium)
- Word Search II (Hard)
- Generate Parentheses (Medium)
- Remove Invalid Parentheses (Hard)
- Regular Expression Matching (Hard)
- Expression Add Operators (Hard)
- Wildcard Matching (Hard)
- Letter Case Permutation (Easy)
- Minimum Sorted Rotated Array (Medium)
- Search in a Rotated Sorted Array (Medium)
- Search for a Range (Medium)
- Sqrt(x) (Easy)
- Search Insert Position (Easy)
- Median of Two Sorted Arrays (Hard)
- Pow(x, n) (Medium)
- Find Peak Element (Medium)
- Target Sum (Medium)
- H-Index II (Medium)
- Swim in Rising Water (Hard)
- Gray Code (Medium)
- Hamming Distance (Easy)
- Total Hamming Distance (Medium)
- Divide Two Integers (Medium)
- Binaray Tree Level Order Traversal (Medium)
- Word Ladder (Medium)
- Word Ladder II (Hard)
- Walls and Gates (Medium)
- Open the lock (Medium)
- Cut Off Trees for Golf Event (Hard)
- Race Car (Hard)
- Bus Routes (Hard)
- Sliding Puzzle (Hard)
- Matrix (Medium)
- Minesweeper (Medium)
- Movie Recommend (Medium)
- Number Of Islands (Medium)
- Course Schedule (Medium)
- Course Schedule II (Medium)
- Alien Dictionary (Hard)
- Graph Valid Tree (Medium)
- Longest Consecutive Sequence (Hard)
- Accounts Merge (Medium)
- CloneGraph (Medium)
- Island Perimeter (Easy)
- Number of Distinct Islands (Medium)
- Number of Distinct Islands II (Hard)
- Smallest Rectangle Enclosing Black Pixels (Hard)
- Bricks Falling When Hit (Hard)
- Robot Room Cleaner (Hard)
- Cracking the Safe (Hard)
- All Paths From Source to Target (Medium)
- Copy List With Random Pointer (Medium)
- Encode and Decode Tiny URL (Medium)
- LFU Cache (Hard)
- LRU Cache (Hard)
- Insert Delete Get Random (Medium)
- Serialize Deserialize Binary Tree (Hard)
- Design Twitter (Medium)
- Tic-Tac-Toe (Medium)
- Implement Trie (Prefix Tree) (Medium)
- Binary Search Tree Iterator (Medium)
- Design Search Autocomplete System (Hard)
- Design Excel Sum Formula (Hard)
- Flatten Nested List Iterator (Medium)
- Add and Search Word - Data structure design (Medium)
- Prefix and Suffix Search (Hard)
- Insert Delete GetRandom O(1) - Duplicates allowed (Hard)
- Kth Largest Element In a Array (Medium)
- Reverse Pairs (Hard)
- Search in a 2D Matrix (Medium)
- Best Time To Buy and Sell Stocks (Easy)
- Best Time to Buy and Sell Stock III (Hard)
- Best Time to Buy and Sell Stock with Transaction Fee (Medium)
- Climbing Stairs (Easy)
- Coin Change (Medium)
- Coin Change 2 (Medium)
- Decode Ways (Medium)
- House Robber (Easy)
- House Robber II (Medium)
- Longest Increasing Subsequence (Medium)
- Longest Paliandromic Substring (Medium)
- Longest Palindromic Subsequence (Medium)
- Maximum Product Subarray (Medium)
- Min Cost Climbing Stairs (Easy)
- Palindrome Partitioning II (Hard)
- UniqueBinary Search Trees (Medium)
- Unique Binary Search Trees II (Medium)
- WordBreak (Medium)
- WordBreak II (Hard)
- Concatenated Words (Hard)
- Can I Win (Medium)
- Maximum Subarray (Easy)
- Dungeon Game (Hard)
- 2 Keys Keyboard (Medium)
- Maximum Sum of 3 Non-Overlapping Subarrays (Hard)
- Maximal Square (Medium)
- Continuous Subarray Sum (Medium)
- Decode Ways II (Hard)
- Palindromic Substrings (Medium)
- Number of Longest Increasing Subsequence (Medium)
- Combination Sum IV (Medium)
- Paint House II (Hard)
- Split Array Largest Sum (Hard)
- Number Of Corner Rectangles (Medium)
- Burst Balloons (Hard)
- Largest Plus Sign (Medium)
- Palindrome Pairs (Hard)
- Cherry Pickup (Hard)
- Knight Probability in Chessboard (Medium)
- Largest Sum of Averages (Medium)
- Minimum Number of Refueling Stops (Hard)
- Cat and Mouse (Hard)
- Stone Game (Medium)
- Odd Even Jump (Hard)
- Profitable Schemes (Hard)
- Jump Game (Medium)
- Jump Game II (Hard)
- Course Schedule III (Medium)
- GasStation (Medium)
- Non-Overlapping Intervals (Medium)
- Minimum Number of Arrows to Burst Balloons (Medium)
- Queue Reconstruction By Height (Medium)
- Task Scheduler (Medium)
- Maximum Length of Pair Chain (Medium)
- Anagrams (Medium)
- Group Anagrams (Medium)
- Kdiff Pairs In a Array (Easy)
- Sort Character by Frequency (Medium)
- Two Sum (Easy)
- Valid Anagram (Easy)
- Maximum Size Subarray Sum Equals k (Medium)
- Contiguous Array (Medium)
- Brick Wall (Medium)
- Partition Labels (Medium)
- Custom Sort String (Medium)
- Short Encoding of Words (Medium)
- Substring with Concatenation of All Words (Hard)
- Sliding Window Maximum (Hard)
- The Skyline Problem (Hard)
- Meeting Rooms II (Medium)
- Top K Frequent Words (Medium)
- Candy (Hard)
- Smallest Rotation with Highest Score (Hard)
- Intersection of two Linked-Lists (Easy)
- Linked List Cycle (Easy)
- Merge K Sorted Lists (Hard)
- Merge Two Sorted List (Easy)
- Paliandrome List (Easy)
- Reverse Linked List (Easy)
- Delete Node in a Linked List (Easy)
- Reverse Nodes in k-Group (Hard)
- Swap Nodes in Pairs (Medium)
- Middle of Linked List (Easy)
- Add Two Numbers (Medium)
- Count Primes (Easy)
- Rotate Function (Medium)
- Water and Jug Problem (Medium)
- Add Digits (Easy)
- Excel Sheet Column Title (Easy)
- Roman to Integer (Easy)
- Bulb Switcher II (Medium)
- Global and Local Inversions (Medium)
- Solve the Equation (Medium)
- Couples Holding Hands (Hard)
- Reaching Points (Hard)
- Nth Magical Number (Hard)
- Random Pick Index (Medium)
- Min Stack (Easy)
- Valid Parentheses (Easy)
- Largest Rectangle In Histogram (Hard)
- Implement Queue using Stacks (Easy)
- Maximal Rectangle (Hard)
- Exclusive Time of Functions (Medium)
- Basic Calculator (Hard)
- Decode String (Medium)
- Longest Valid Parentheses (Hard)
- First Unique Character In a String (Easy)
- Repeated Substring Pattern (Easy)
- Reverse Words In a String (Medium)
- ReverseWords II (Medium)
- String to Integer (Medium)
- Text Justification (Hard)
- ZigZag Conversion (Medium)
- Implement StrStr (Easy)
- Excel Sheet Column Number (Easy)
- Compare Version Numbers (Easy)
- Valid Palindrome (Easy)
- Simplify Path (Medium)
- Permutation in String (Medium)
- Add Binary (Easy)
- Valid Palindrome II (Easy)
- One Edit Distance (Medium)
- Count and Say (Easy)
- Multiply Strings (Medium)
- Longest Word in Dictionary through Deleting (Medium)
- Isomorphic Strings (Easy)
- String Compression (Easy)
- Longest Common Prefix (Easy)
- Find the Closest Palindrome (Hard)
- Monotone Increasing Digits (Medium)
- Shortest Palindrome (Hard)
- Valid Word Abbreviation (Easy)
- Longest Palindrome (Easy)
- Replace Words (Medium)
- Rotate String (Easy)
- Binaray Tree Right Side View (Medium)
- Binary Tree Maximum Path Sum (Hard)
- Boundary of Binary Tree (Medium)
- Convert sorted array to BST (Medium)
- Lowest Common Ancestor of a Binary Tree (Medium)
- Lowest Common Ancestor of a BST (Easy)
- Most Frequent Subtree Sum (Medium)
- Path Sum III (Easy)
- Convert Postorder and Inorder traversal to Binary Tree (Medium)
- Convert Preorder and Inorder traversal to Binary Tree (Medium)
- Sorted Array to BST (Medium)
- Valid Binary Search Tree (Medium)
- Largest BST Subtree (Medium)
- Closest Binary Search Tree Value (Easy)
- Inorder Successor in BST (Medium)
- Construct String From Binary Tree (Easy)
- Flatten Binary Tree to Linked List (Medium)
- Populating Next Right Pointers in Each Node (Medium)
- Populating Next Right Pointers in Each Node II (Medium)
- Subtree of Another Tree (Easy)
- Binary Tree Zigzag Level Order Traversal (Medium)
- Binary Tree Inorder Traversal (Medium)
- Symmetric Tree (Easy)
- Maximum Binary Tree (Medium)
- Find Bottom Left Tree Value (Medium)
- Diameter of Binary Tree (Easy)
- Binary Tree Paths (Easy)
- Sum of Left Leaves (Easy)
- Two Sum IV - Input is a BST (Easy)
- Average of Levels in Binary Tree (Easy)
- Convert Binary Search Tree to Sorted Doubly Linked List (Easy)
- Same Tree (Easy)
- Binary Tree Longest Consecutive Sequence II (Medium)
- Minimum Absolute Difference in BST (Medium)
- Equal Tree Partition (Medium)
- Split BST (Medium)
- Closest Leaf in a Binary Tree (Medium)
- Maximum Width of Binary Tree (Medium)
- Recover Binary Search Tree (Hard)
- Binary Tree Postorder Traversal (Hard)
- Serialize and Deserialize N-ary Tree (Hard)
- Convert BST to Greater Tree (Easy)
- Four Sum (Medium)
- Longest Substring Witout Repeats (Medium)
- Three Sum (Medium)
- Trapping Rain Water (Hard)
- 3Sum Closest (Medium)
- Move Zeroes (Easy)
- Remove Duplicates (Easy)
- Remove Duplicates II (Medium)
- Minimum Size Subarray Sum (Medium)
- Minimum Window Substring (Hard)
- Smallest Range (Hard)
- Subarray Product Less Than K (Medium)
- Number of Matching Subsequences (Medium)