
Sort the array, then apply a two-pointer approach to find unique triplets that sum to zero, and collect them in the output while skipping duplicates.
Generate all letter combinations for a phone number by mapping digits 2–9 to letters and building combinations from an initial empty string.
Learn to compute the product of the array except self by initializing an output array with ones, then accumulate left-side products, and finally multiply by right-side products.
Count contiguous subarrays with sum equals k using prefix sums and a frequency map. Track current sums, initialize with zero, and update counts to find all valid subarrays.
Learn the decode string technique using a stack to handle digits and brackets, repeating encoded segments and constructing the final string.
Learn to find the maximum product subarray by tracking both the current maximum and minimum with each element, handling negatives and zeros to update the result.
Learn to search for a target in a rotated sorted array using binary search, identify the sorted half, and narrow the range to return the index or -1.
Explore how to find the first and last positions of a target in a sorted array using binary search, achieving O(log n) time by performing left and right searches.
Implement next permutation in place: locate the key from the back, swap with the next greater to its right, and sort the remaining numbers ascending; if none, reset to ascending.
Learn to group anagrams by sorting each word to form a key, store matching words in a hash map, and return the grouped lists in any order.
Learn how to add binary strings with carry by traversing from the end, using a string builder to build the correct binary sum.
Learn to generate all subsets of a unique-element array, avoiding duplicates, using backtracking and recursion to build the solution set.
Learn to validate a binary search tree by checking each node against a min-max range, using a recursive helper function.
Compute the maximum depth of a binary tree using either a queue-based level-order traversal or a recursive approach with base cases and max(left, right).
Learn to serialize a binary tree to a comma-separated string and reconstruct it from that string using a queue and a recursive helper, preserving root, left, and right order.
Explore the counting bits problem by building an output array that counts the number of ones in the binary representation of each number, using right shift and dynamic programming.
Learn to extract the top k frequent elements from an array using a hash map and a priority queue, as shown with 1,1,1,2,2,3.
Learn to compute the intersection of two arrays with a two-pointer approach, handle frequencies, build the output array, and note a binary search optimization for large inputs.
This lecture explains a basic calculator that evaluates string expressions with plus, minus, and parentheses, using a stack for parentheses handling and iterative parsing for linear time.
Learn how to compute the nested list weight sum II by traversing integers and lists with a helper function, using recursion to accumulate level weighted totals.
Merge k sorted linked lists into one sorted list using a priority queue and a dummy node to build the result.
Solve the LeetCode 198 house robber problem by choosing non consecutive houses to maximize loot, using dynamic programming with a recurrence that adds the current value two steps back.
Count primes from two to n using a sieve-style boolean array that marks multiples of each prime. For n = 10, primes 2, 3, 5, and 7 total four.
This lecture shows how to find the maximum subarray sum in a contiguous array by maintaining a running sum and a max value, resetting when negative.
Decode ways problem maps digits to letters a–z and counts possible decodings using dynamic programming, with a table tracking ways, handling single-digit and valid two-digit 10–26, including zero.
Learn to find the k pairs with smallest sums from two arrays using a priority queue, then optimize memory by capping the heap to k.
Determine whether an array can be partitioned into two subsets with equal sum by reducing to a half sum target and solving a boolean dynamic programming subset sum.
Master finding all anagrams in a string using a sliding window and a twenty six character count table to balance characters and detect matches for LeetCode interview prep.
Master the minimum path sum problem by computing the minimal cost from top-left to bottom-right in a grid, moving only right or down, using dynamic programming.
Discover how to derive an alien dictionary order by comparing words, build a graph of character precedence with in-degree, then perform a topological sort to output the correct letter order.
learn to find the k closest points to the origin by computing squared distances, using a priority queue to sort points in ascending order, and selecting the top k.
Explore the word break problem by determining if a string can be segmented. Use a dynamic programming approach with a boolean table to validate prefixes and substrings against the dictionary.
Solve the climbing stairs problem using dynamic programming, where each step equals the sum of the two previous steps, resembling the Fibonacci sequence; count all ways to reach the top.
Explore the jump game: determine if you can reach the last index from the first in an array of non-negative integers by tracking the maximum reachable distance as you scan.
Use binary search to find the first index of a target in a sorted array, using start and end pointers to adjust boundaries.
"2000+ Leetcode questions??"
"That must be super intimidating to prepare for the interview!"
"Do I need to know them all? How long will I get through all of them?"
You are not alone! We are here practicing the same questions but some question is really important and sometimes fun to know. I list some of them here and let's take a look at them together.
This course is for all those people who want to learn the basics of data structure and algorithms from the absolute beginner to the Intermediate level. We will use many examples to make the lectures very easy to understand and digest.
I HIGHEST recommend everyone to take the "100 Leetcode challenge course" from my course list to warm up the muscle memory, which will give it a good foundation for these great Leetcode questions.
After going through these 35 Leetcode questions, you will get your foot wet and start trying some "Medium" and "HARD" questions soon. The purpose of this course is to learn to understand some interview coding standards and get familiar with the real interview setup.
If you have any questions, please feel free to comment below. I will get back to you as soon as possible. I hope you have a wonderful learning experience here!