
Explore the container with the most water problem using an array of heights, computing area as width times the minimum of two walls, with edge cases and a brute-force intro.
Explore the brute force approach to the container with the most water by checking each pair of walls and computing area as the minimum height times the width, updating maximum.
Walks through a brute force pseudocode approach to the container with the most water, calculating area with min height and width while updating the max area.
Explore a two-pointer approach to optimize the container with most water, reducing time complexity from O(n^2); move the pointer on the smaller height to maximize the area.
Walk through the two-pointer approach for the container with most water: compute area as min(height L, height R) times (R - L), update max, and move the shorter pointer.
Implement two-pointer solution for LeetCode container with most water: initialize max area and left and right pointers, compute area as min height times width, and move smaller pointer.
Check for a valid mountain by a strictly increasing subarray from the start to a point, then a strictly decreasing subarray to the end. Arrays shorter than three return false.
Identify an increasing subsequence with a first loop, then a decreasing subsequence with a second loop, tracking ends to ensure the pattern reaches the array end.
Walk through a pseudocode algorithm that detects a mountain array by finding an increasing subsequence, then a decreasing subsequence, with O(n) time and O(1) space.
Implement the valid mountain array function by climbing up while the sequence increases, then descending, and return true if the entire array is consumed, otherwise false.
Solve the boats to save people problem: given weights and a limit, minimize boats by placing at most two people per boat with sum not exceeding the limit.
Sort the array to access heaviest and lightest candidates. Use a two-pointers approach to pair compatible candidates and count boats, maximizing two-person boats.
Walks through a pseudocode driven two-pointer solution to the boat problem: sort weights, pair lightest with heaviest within the limit, count boats, and analyze time and space complexity.
Sort the array ascending, set two end pointers, and pair lightest with heaviest to minimize boats. If pairing fails, assign the heaviest alone and increment boats, then test on LeetCode.
Move all zeros to the end of an array while preserving the relative order of non-zero elements, using a brute-force approach with a temporary output array.
Walk through a brute force pseudocode that builds an output array of non-zero elements, then appends zeros; analyze time complexity O(n) and O(n-m) and space O(n).
Use an in-place two-pointer approach to move non-zero elements to the front, tracking count with j. Then fill the remaining positions with zeros.
Walk through the optimal in‑place move zeros solution, using a j pointer to compact nonzeros at the front, then fill the rest with zeros, achieving O(n+m) time and O(1) space.
Implement in-place zero-movement by relocating non-zero elements to the front while preserving their order, and filling the remainder with zeros using a zero index and a non-zero index.
Explore the longest substring without repeating characters problem, focusing on contiguous substrings, and distinguish it from subsequences with examples, edge cases, empty string. Preview a simple brute force approach.
Explore a brute-force approach to finding the longest substring without repeating characters, using hash maps for each starting position to expand substrings until a duplicate appears.
Follow a pseudocode walkthrough that starts from brute force and demonstrates a sliding window approach to find the longest substring without repeating characters, using a seen characters map.
Use the sliding window with left and right pointers, track last-seen indices in a map, and adjust left as the max between its current value and last index plus one.
Walk through a sliding window solution for the longest substring without repeating characters, using left and right pointers and a seen character map, with O(n) time and O(n) space.
Explore a brute force pseudocode walkthrough for finding the first and last indices of a target in an array, using linear scans and analyzing time (O(n)) and space (O(1)) complexities.
Use binary search on the sorted array to find the first and last positions of the target by locating the leftmost and rightmost occurrences.
Follow a pseudocode walkthrough of binary search to find the first and last occurrences of a target in a sorted array, using two pointers, mid calculations, and boundary checks.
Walk through two-pointer binary search to find the last occurrence of a target in a sorted array, updating left and right boundaries, and analyzing O(log n) time with constant space.
Implement binary search to locate the first and last positions of a target in a sorted array, returning -1 when not found.
Explore the first bad version problem with brute force using isBadVersion, noting that once a version is bad, all later versions are bad, with O(n) time and O(1) space.
Apply binary search to find the first bad version using isBadVersion. Narrow the range with left and right pointers until left equals right, then return the first bad version.
Identify the first bad version using a binary search with two pointers, mid calculations, and an isBadVersion API, achieving O(log n) time and O(1) space.
Implement the binary search approach to identify the first bad version among many, using left and right pointers, mid checks, and the isBadVersion function.
Identify the missing number in an array of n distinct numbers from zero to n. Recognize that the missing value completes the zero-to-n sequence.
Implement the brute force approach by sorting the input, then scanning consecutive elements to detect a gap greater than one and return the missing number (current minus one).
Apply Gauss's formula to compute the sum from zero to n and reveal the missing number by subtracting actual sum from expected sum, in O(n) time and O(1) space.
Implement the missing number function by tallying input numbers, computing the expected total with Gauss's formula n(n+1)/2, and returning the difference as the missing number.
Count the number of prime numbers less than a given nonnegative n using a brute force approach that checks divisibility from two to n and tracks primes.
Walk through a pseudocode brute-force approach to finding primes below a given input, using an is-prime flag and nested loops, with O(n^2) time and O(1) space.
Learn an optimal sieve approach to identify primes up to n by marking non-prime multiples, starting from i times i and stopping at the square root of n.
Implement a primes counting function using an isprime array, mark multiples up to sqrt(n) as non-prime, and count true entries to return the prime count.
Explore the single number problem and its unsorted array constraints, and learn a brute force approach using a hash map to count occurrences and locate the unique element.
Apply a better approach to find the single non-duplicate in an array using a set of unique elements and the formula 2 times the sum of unique minus actual sum.
Implement a function that finds the number that appears once in a list of integers by counting occurrences with a map and returning the unique element.
Explore optimal approach that achieves linear time with constant space using xor on binary bits to cancel duplicates. Learn how binary representations and xor reveal the number that occurs once.
Use a bitwise xor to cancel out pairs and reveal the single occurrence in a list of integers. Initialize the result to zero and return the unique value.
Want to master popular problem-solving techniques, data structures, and algorithms that interviewers love? Dive right in!
Crave step-by-step explanations for the industry's hottest interview questions? We've got you covered.
Looking to up your game in competitive programming? Buckle up for a thrilling journey!
Welcome to the course!
In this course, you'll have a detailed, step by step explanation of hand-picked LeetCode questions where you'll learn about the most popular techniques and problems used in the coding interview, This is the course I wish I had when I was doing my interviews. and it comes with a 30-day money-back guarantee
What is LeetCode?
LeetCode is essentially a huge repository of real interview questions asked by the most popular tech companies ( Google, Amazon, Facebook, Microsoft, and more ).
The problem with LeetCode is also its advantage, IT'S HUGE, so huge in fact that interviewers from the most popular companies often directly ask questions they find on LeetCode, So it's hard to navigate through the huge amount of problems to find those that really matter, this is what this course is for.
I spent countless hours on LeetCode and I'm telling you that you don't have to do the same and still be able to get a job at a major tech company.
Course overview :
In this course, I compiled the most important and the most popular interview questions asked by these major companies and I explain them, in a true STEP BY STEP fashion to help you understand exactly how to solve these types of questions.
The problems are handpicked to ensure complete coverage of the most popular techniques, data structures, and algorithms used in interviews so you can generalise the patterns you learn here on other problems.
Each problem gets multiple videos :
Explanation and intution video(s): we do a detailed explanation of the problems and its solution, this video will be longer because we will do a step by step explanation for the problems.
Coding video(s): where we code the solution discussed in the explanation video together.
Walkthrough video(s): where we go over each line of code and see what it does
We will use basic javascript for this course to code our solutions, previous knowledge in javascript is preferred but NOT required for the coding part of the course.
The problems are categorised for easier navigation and will be regularly updated with more popular and interesting problems.
Some of the stuff this course will cover are :
Arrays and Strings interview questions.
Searching interview questions and algorithms.
Dynamic Programming interview questions.
Backtracking interview questions ( With step by step visualisation ).
Trees and Graphs interview questions and algorithms.
Data structures Like Stacks, Queues, Maps, Linked Lists, and more.
In other words, this course is your one-stop-shop for your dream job.