This repository contains my solutions for some LeetCode problems using C++.
- Contains Duplicate
- Valid Anagram
- Two Sum
- Group Anagrams
- Top K Frequent Elements
- Product of Array Except Self
- Valid Sudoku
- Encode and Decode Strings
- Longest Consecutive Sequence
- Valid Palindrome
- Two Sum II
- 3Sum
- Container with Most Water
- Trapping Rain Water
- Best Time to Buy & Sell Stock
- Longest Substring Without Repeating Characters
- Longest Repeating Character Replacement
- Permutation in String
- Minimum Window Substring
- Sliding Window Maximum
- Valid Parantheses
- Min Stack
- Evaluate Reverse Polish Nation
- Generate Parantheses
- Daily Temperatures
- Car Fleet
- Largest Rectangle in Histogram
- Binary Search
- Search a 2D Matrix
- Koko Eating Bananas
- Search Rotated Sorted Array
- Find Minimum in Rotated Sorted Array
- Time Based Key-Value Store
- Find Median of Two Sorted Arrays
- Reverse Linked List
- Merge Two Linked Lists
- Reorder List
- Remove Nth Node from End of List
- Copy List with Random Pointer
- Add Two Numbers
- Linked List Cycle
- Find the Duplicate Number
- LRU Cache
- Merge K Sorted Lists
- Reverse Nodes in K-Group
- Invert Binary Tree
- Maximum Depth of Binary Tree
- Diameter of a Binary Tree
- Balanced Binary Tree
- Same Tree
- Subtree of Another Tree
- Lowest Common Ancestor of a BST
- Binary Tree Level Order Traversal
- Binary Tree Right Side View
- Count Good Nodes in a Binary Tree
- Validate Binary Search Tree
- Kth Smallest Element in a BST
- Construct Tree from Preorder and Inorder Traversal
- Binary Tree Max Path Sum
- Serialize and Deserialize Binary Tree
- Implement Trie
- Design Add and Search Word Data Structure
- Word Search II
- Kth Largest Element in a Stream
- Last Stone Weight
- K Closest Points to Origin
- Kth Largest Element in an Array
- Task Scheduler
- Design Twitter
- Find Median from Data Stream
- Subsets
- Combination Sum
- Permutations
- Subsets II
- Combination Sum II
- Word Search
- Palindrome Partitioning
- Letter Combinations of a Phone Number
- N-Queens
- Number of Islands
- Clone Graph
- Max Area of Island
- Pacific Atlantic Waterflow
- Surrounded Regions
- Rotting Oranges
- Walls and Gates
- Course Schedule
- Course Schedule II
- Redundant Connection
- Number of Connected Components in Graph
- Graph Valid Tree
- Word Ladder
- Reconstruct Itinerary
- Min Cost to Connect all Points
- Network Delay Time
- Swim in Rising Water
- Alien Dictionary
- Cheapest Flights Within K Stops
- Climbing Stairs
- Min Cost Climbing Stairs
- House Robber
- House Robber II
- Longest Palindromic Substring
- Decode Ways
- Coin Change
- Maximum Product Subarray
- Word Break
- Longest Increasing Subsequence
- Partition Equal Subset Sum
- Unique Paths
- Longest Common Subsequence
- Best Time to Buy/Sell Stock With Cooldown
- Coin Change II
- Target Sum
- Interleaving String
- Longest Increasing Path in a Matrix
- Distinct Subsequences
- Edit Distance
- Burst Balloons
- Regular Expression Matching
- Maximum Subarray
- Jump Game
- Jump Game II
- Gas Station
- Hand of Straights
- Merge Triplets to Form Target Triplet
- Partition Labels
- Valid Paranthesis String