
Explore the container with the most water problem, where heights form vertical lines and two lines enclose water with area equal to the minimum height times the index difference.
Learn a brute force approach that checks every pair of walls, computes the area as the minimum height times the width, and tracks the maximum container area.
Walks through a brute-force pseudocode for container with most water, testing wall pairs to update max area, using length as minimum height and width as index difference, noting O(n^2) time.
Apply the two-pointer technique to optimize the brute-force container problem from O(n^2). Move the pointer at the smaller wall, computing area as min(height left, height right) times width.
Apply a two-pointer walkthrough on the input array to compute the maximum area by evaluating height and width, and achieve O(n) time and O(1) space.
Implement the two-pointer solution to maximize area by initializing left and right pointers, updating max area with min(height left, height right) times width, and moving the smaller height pointer.
introduces the valid mountain array problem, asking whether an array of at least three elements contains a strictly increasing prefix followed by a strictly decreasing suffix.
Analyze an array by first locating an increasing subsequence, then verifying a decreasing subsequence until the end using a loop and a tracking index.
Follow a pseudocode walkthrough to validate a mountain array by tracing an increasing subsequence and then a decreasing subsequence, using two loops with constant space and O(n) time.
Implement the valid mountain array by simulating a climber traversing an integer array: ascend to the peak, then descend, returning true if the end is reached.
Explore the boats to save people problem, where each boat carries at most two people with a weight limit, and learn how to minimize boats with concrete examples.
Learn to maximize boats carrying two people by sorting the weights and using a two-pointers approach to pair heaviest with lightest within the limit, or assign solo boats.
Walks through a pseudocode solution to a two-pointer boat problem: sort weights, pair heaviest with lightest when possible, count boats, and analyze time and space complexity.
Sort the array in ascending order and use two pointers from lightest and heaviest to pair people within the boat limit, counting boats as you go, and submit to LeetCode.
Move zeros to the end of an array while preserving the relative order of non-zero elements using a brute force approach with an extra array; note a more elegant solution.
Walks through brute force pseudocode for filtering non-zero elements into an output array, appending zeros, and then analyzes time and space complexity, while introducing in-place modification to reduce space usage.
Learn an in-place technique to move non-zero elements to the front of an array using two pointers, avoiding extra memory and filling the rest with zeros.
Explore an in-place, two-pass approach to move zeros, using a j index to copy nonzero elements and then fill the rest with zeros, with O(n+m) time and O(1) space.
Implement the move zeros function to relocate non-zero elements forward while moving zeros to the end, preserving their relative order, using a zero index and a non-zero index, in-place.
Find the length of the longest substring without repeating characters in a string, noting that substrings are contiguous and contrasting with subsequences. Review test cases and introduce a brute-force approach.
Explore the brute force intuition for finding the longest substring without repeating characters by checking all substrings, using a starting position and a hash map to track seen characters.
Walk through the pseudocode for the longest substring without repeating characters, using a brute-force approach with left and right pointers and a seen map, and updates the max length.
Explore the sliding window approach for finding the longest substring without repeating characters, using two pointers and a last-index map to adjust the left boundary and track the maximum length.
Learn a sliding window technique using a left and right pointer and a seen map to find the longest substring without repeats, with O(n) time and O(n) space.
Implement a function that returns the length of the longest unique substring. Use a sliding window with a character-to-position map and left and right pointers to solve LeetCode style problems.
Explore finding the first and last positions of a target in a sorted array using brute force, including single occurrence and not-found handling.
Walk through a brute force pseudocode walkthrough of find first and find last, scanning the input array for a target and returning indices while noting O(n) time and O(1) space.
Apply binary search to a sorted array to find the first and last positions of a target, improving over brute force with logarithmic time complexity.
Walk through a pseudocode binary search to find the first and last occurrences of a target in a sorted array, using left, right, and mid pointers.
Use a binary search with left and right pointers to find the last occurrence of the target, with time O(log n) and space O(1).
Implement binary search to find the first and last positions of a target in a sorted array, using left and right boundaries, mid calculations, and returning [first, last].
Identify the first bad version using a brute force linear search with the isBadVersion API, exposing the problem constraints, a linear time O(n) approach, and constant space.
Use binary search to find the first bad version by leveraging isBadVersion, shrinking the search range by half until the first bad version is identified.
Demonstrates a binary search to locate the first bad version using the isBadVersion API. Update left, right, and mid until left equals right, achieving log n time and O(1) space.
Apply binary search to locate the first bad version among many software iterations, using left, right, and mid pointers and the isBadVersion check on LeetCode.
Tackle the missing number problem in Go by analyzing an array of n distinct numbers from zero to n to identify the missing value, with examples and constraints.
Use brute force approach to find the missing number by sorting the input and scanning for a gap between consecutive elements; if a gap exists, return current minus one.
Explore a missing number problem from zero to n, compare a nested O(n^2) approach with a hash map based O(n) solution that achieves constant-time lookups and discusses space tradeoffs.
Walk through a pseudocode approach 2 for finding the missing number by building a present numbers map and returning the first absent value, with O(n) time and O(n) space.
Apply Gauss's formula to compute the missing number in a 0..n sequence, subtract the actual sum from the expected n(n+1)/2, and achieve O(n) time and O(1) space.
Implement the missing number function by summing input numbers, using Gauss's formula to compute the expected total, and subtracting to reveal the missing value for submission to LeetCode.
Count the primes less than n by a brute force check of each candidate from two up to the current number, marking primes when no divisors exist for non-negative inputs.
Walk through a brute force prime-checking pseudocode for numbers less than the input, demonstrate nested loops and the is_prime flag, and analyze time complexity O(n^2) and space complexity O(1).
Learn an optimal sieve-based approach to find primes up to n by marking non-primes starting from i times i, stopping at sqrt(n) to optimize, and counting the remaining true values.
Walk through a sieve of Eratosthenes for n = 34, marking multiples and counting primes, revealing 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and 31.
Implement a count primes function in Go that returns zero when n < 2, uses an isprime array, marks multiples to sqrt(n) as non-prime, and counts primes up to 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 GO for this course to code our solutions, previous knowledge in GO 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.