
Introduces the container with the most water problem using a heights array and two lines; area equals width times the minimum height, with examples and edge cases.
Use a brute force approach to the water container problem, examining every pair of walls, computing area as the minimum height times the width (indices difference), and updating the maximum.
Apply the two-pointer technique to improve the brute-force solution from O(n^2), moving the smaller wall pointer and computing area as min(height left, height right) times width.
Use a two-pointer approach with left and right indices to compute area as the minimum height times width, update max area, and move the shorter pointer until left meets right.
Implement the two-pointer approach by initializing max area, left pointer L, and right pointer R, updating max area with min(height[L], height[R])*(R-L), and moving the smaller height pointer until completion.
Analyze the valid mountain array problem: check for a strictly increasing prefix followed by a strictly decreasing suffix in an array of integers with length at least three.
Learn to detect an increasing subsequence followed by a decreasing subsequence using two passes: extend the increasing run, save its end, then verify the final decreasing run reaches the end.
Walk through a pseudocode walkthrough to validate a mountain array by scanning for an increasing subsequence, then a decreasing subsequence, with O(n) time and O(1) space.
Explore the boats to save people problem, where each boat carries at most two people with total weight not exceeding the limit, to minimize the number of boats.
Discover how to think about pairing people for boat capacity by sorting weights and using two pointers to maximize two-person boats within the limit.
Walk through a two-pointer, sort weights, pair lightest with heaviest within the limit to minimize boats, with time complexity n log n and space complexity n.
Sort the weights in ascending order and use two pointers at the lightest and heaviest to assign boats, pair when the sum is within limit, otherwise send the heaviest alone.
Move zeros to the end of an array while preserving the relative order of non-zero elements. Use a brute-force approach that builds a new array with non-zero elements, then zeros.
Walks through the brute-force pseudocode to collect non-zero elements into an output array, append zeros, and analyze time and space complexity.
Move non-zero elements to the front in place using two pointers, tracking j as the count of non-zeros, then fill the rest with zeros.
Walk through the optimal in-place solution for moving zeros, using a j pointer to copy nonzero values and fill the rest with zeros, yielding O(n) time and O(1) space.
Implement the move zeros algorithm in place by tracking a zero index and a non-zero index to push non-zeros forward while zeros fill at the end, without any additional space.
Identify the length of the longest substring without repeating characters in a given string, emphasizing that substrings are contiguous and contrasting them with subsequences, including examples and edge cases.
Explore brute force intuition for the longest substring without repeating characters by checking every substring, using hash maps to track seen characters, and resetting on duplicates.
Master the sliding window approach to find the longest substring without repeating characters using two pointers and a last-seen indices map, updating the window and longest length as you go.
Walk through the pseudocode for the longest substring without repeating characters using a sliding window with l and r, a seen-characters map, and updates to the longest length.
Implement the function to return the length of the longest unique substring using a sliding window and a map of last seen positions, updating left, right, and the maximum length.
Brute force method finds first and last positions of a target in a sorted ascending array by scanning from the start and from the end, returning indices or -1 -1.
A brute force pseudocode walkthrough demonstrates find first and find last in an array, returning indices and analyzing time complexity O(n) and space complexity O(1).
Apply binary search to a sorted array to locate the first and last positions of a target, halving the search span and improving over brute force.
Walks through a binary search pseudocode to find the first and last occurrences of a target in a sorted array using left and right pointers, mid calculations, and conditional checks.
Walk through a two-pointer search to find last occurrence of a target in a sorted array, using mid checks and range updates. Reveals O(log n) time with constant space.
Apply binary search to locate the first and last positions of a target in a sorted array, returning them as an array or -1 if the target is absent.
Introduces the first bad version problem and demonstrates brute force linear search using isBadVersion, analyzing versions 1 through n with O(n) time and O(1) space.
Learn the optimal binary search approach to find the first bad version using isBadVersion, narrowing the search space from 1 to n until the first bad version is identified.
Walks through a binary search to identify the first bad version using a provided isBadVersion API, demonstrating mid calculation, pointer updates, and O(log n) time with O(1) space.
Implement the first bad version solution on LeetCode using binary search with left and right pointers. Identify the first bad version by checking mid minus one with isBadVersion.
Explore the missing number problem: given an array of n distinct numbers from 0 to n, find the missing number, with examples and guarantees that exactly one number is missing.
Explore solving the missing number problem in an array of 0 to n, comparing a naive O(n^2) search with a hash map based O(n) solution.
Walk through pseudocode approach 2 using a presence map to mark input numbers and scan 0 to n for the missing number, with O(n) time and space.
Use Gauss's formula to compute the expected sum from zero to n, subtract the actual sum to reveal the missing number, achieving linear time and constant space in C#.
Implement the missing number solution in C# by summing the input array, computing the total with Gauss's formula n(n+1)/2, and subtracting to reveal the missing number, then submit to LeetCode.
Count primes less than n with a brute force method by checking divisibility from two to i-1 for each i, noting that n can be non-negative.
Walk through a pseudocode brute-force prime-checking algorithm, counting primes less than n with an is-prime flag and nested loops. Show time complexity is O(n^2) and space is O(1).
Use a sieve-like approach to mark non-primes by multiples, starting from i times i, up to n, stopping at the square root of n, and count the remaining primes.
Walk through a sieve of Eratosthenes algorithm that marks multiples as non-prime in an array up to 34, identifying primes up to the square root of n.
Implement a sieve-based prime counter in C# that returns number of primes up to n, using an is_prime array, with case n < 2, and marking multiples up to sqrt(n).
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 intuition 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 c# for this course to code our solutions, previous knowledge in c# 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.