This is a collection of my HackerRank, LeetCode, and Geeks for Geeks problem solutions written in C++, Java, and Python 3. Each solution passes all test cases unless otherwise stated.
- Algorithms
- 4Sum
- Preorder and Inorder Traversal
- Postorder and Inorder Traversal
- Binary Tree Maximum Path Sum
- Binary Tree Zigzag Level Order Traversal
- Container With Most Water
- Contains Duplicate III
- Data Stream as Disjoint Intervals
- Difference Ways to Add Parenthesis
- Distinct Subsequences
- Dungeon Game
- Edit Distance
- Flatten Binary Tree to Linked List
- Game of Life
- Is Balanced
- K Pairs with Smallest Sums
- Kth Largest Element
- Kth Smallest Element in Sorted Matrix
- Largest Rectangle in Histogram
- LCA of a Binary Tree
- Lexicographical Numbers
- Linked List Cycle II
- Majority Element II
- Max Points on a Line
- Median of Two Sorted Arrays
- Mini Parser
- Minimum Height Tree
- Minimum Window Substring
- N-Queens II
- Palindrome Linked List
- Palindrome Pairs
- Permutation Sequence
- Permutations II
- Range Sum Query - Mutable
- Recover Binary Tree
- Rectangle Area
- Regular Expression Matching
- Remove Duplicates from Sorted Array II
- Remove K Digits
- Reverse Nodes in k-Group
- Reverse Words in a String
- Rotate Image
- Set Matrix Zeroes
- Skyline
- Sliding Window Maximum
- Shortest Palindrome
- Sorted Array to BST
- Spiral Matrix
- Sqrt(x)
- Stock Profit III
- Stock Profit IV
- Subsets II
- Substring with Concatenation of All Words
- Validate BST
- Wildcard Matching
- Word Break