3Sum | LeetCode | Solution Explained
LeetCode 15. 3Sum is a very popular interview question. I explain the brute-force solution, binary search optimization and...
Count Complete Tree Nodes | Solution (Explained)
LeetCode 222. Count Complete Tree Nodes is a medium problem if you go by the naive solution. To...
Find Minimum in Rotated Sorted Array II | Solution Explained
What makes LeetCode 154. Find Minimum in Rotated Sorted Array II fun is the optimized solution. I explain...
Insert Delete GetRandom O(1) | Solution Explained
LeetCode 380. Insert Delete GetRandom O(1) is an implementation based question, requiring us to know the time complexities...
Next Greater Element I | Solution Explained + Stack Optimization
LeetCode 496. Next Greater Element I is a simple problem, since brute-force solution can get accepted. But, we...
Path Sum III | Solution Explained
LeetCode 437. Path Sum III. I explain the brute-force solution and the optimized solutions in detail for reducing...
Best Time to Buy and Sell Stock with Cooldown | Solution Explained
LeetCode 309. Best Time to Buy and Sell Stock with Cooldown. I solve this problem using recursion. Solution...
Perfect Squares | LeetCode | Solution Explained
279. Perfect Squares on LeetCode is a mathematical problem, requiring us to pair math with algorithms. I explore...
Construct BST from Preorder Traversal | LeetCode | Solution Explained
1008. Construct Binary Search Tree – BST from Preorder Traversal is a question which relies upon understanding the...
Guess Number Higher or Lower | LeetCode | Solution Explained
374. Guess Number Higher or Lower LeetCode is based on the understanding of binary search, and how we...