
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore the FAANG interview journey from recruiter gut checks, and learn to ace technical problems through data structures and algorithms, critical and abstract problem solving, and clear communication.
Join the online classroom to stay accountable and finish the course, building tough coding interview skills through a supportive community, accountability buddies, and active peer help.
Explore free Gtlm resources—coding challenges, open source projects, cheat sheets, blogs, and monthly newsletters—to support your FAANG interview prep and career growth.
Master the coding interview with this two sum question: explore arrays, constraints, edge cases, and how to verify solutions during technical interviews.
Develop and explain test cases for the two-sum problem, from the best-case scenario with target 11 and array [1,3,7,9,2] to edge cases returning null, and illustrate the two-pointer approach.
Convert the logical two-sum solution into a brute force approach using nested loops to find indices p1 and p2. Then double-check for errors and test against cases.
Test your solution against test cases by stepping through for loops with p1 and p2, validating target and number to find, and noting null cases like empty arrays.
Explore how LeetCode enhances interview prep by testing your solution against real test cases and comparing performance, then apply space and time complexity insights to upcoming questions.
Analyze space and time complexity of solutions, focusing on nested loops yielding O(n^2) time and O(1) space, and explore polynomial versus exponential growth to guide optimization.
Explore trading space for time by replacing a two-loop approach with a hash map to store the number-to-find and its index, enabling constant-time lookups and a single pass.
Convert the optimal solution into a code solution by implementing a single for loop with a nums map to track the target number to find and its index.
Walks through testing an optimal solution with test cases, using a hash map to track values, handling edge cases, and analyzing time and space complexity as O(n).
Learn how to check LeetCode performance by analyzing runtime and memory usage, understanding space and time complexity, and comparing your solution to others using the solution and discussion tabs.
Analyze an array of positive integers to pick two bars that form the container with the greatest water area, using the shorter height and the distance between bars as width.
Craft test cases for the container with most water, identifying max area as min wall value times index distance, and cover edge cases like empty or single-element arrays.
Explore a logical brute-force approach to the container with the greatest water area. Use a two-pointer method, with min(left, right) as length and right-left as width, to maximize area.
Implement a brute force solution to the max water container problem using two pointers, nested loops, and Math.min and Math.max to compute area and track the maximum.
Walk through the code with a test array, map the logic to the prior solution, and explain why a single-element input yields zero.
Learn how the two-pointer technique optimizes the container problem by shifting the smaller value, reducing unnecessary work, and maximizing area while tracking the best result.
Develop and test an optimal container with most water solution using a two-pointer pattern, tracking p1 and p2, height, width, and max area on LeetCode.
Develop critical thinking to solve a hard array question on trapping rainwater from an elevation map, moving from brute force to an optimal solution, while analyzing constraints and test cases.
The lecture shows solving the water container problem by using max left and max right values to compute water per element via min(maxLeft, maxRight) minus current height.
Transform a logical solution into a brute-force code that calculates trapped water from a heights array using left/right pointers and min(max left, max right) minus height.
Learn to optimize trapping rainwater from brute force to a two-pointer solution, using left and right pointers with max left and max right to improve runtime while maintaining constant space.
Master the optimal two-pointer solution for the height array problem by tracking left and right maxima, updating water totals, and achieving O(n) time and O(1) space, with guided practice.
Submit your LeetCode solution to see runtime and memory percentiles and ensure edge cases are covered by test cases. Focus on space-time complexity and code correctness, not percentages.
Apply the two-pointer technique to strings by modeling them as arrays, handle backspace with #, and determine equality of typed-out strings under case sensitivity.
Design a brute force solution for backspace string processing using left-to-right processing and arrays. Explore test cases based on constraints and implement final string comparison.
Code a generic backspace processing function to build a final string by removing previous characters when encountering a hash, then compare two final strings using a dry, two-function approach.
Analyze space and time complexity of a brute-force solution and its build string function, derive O(A+B) time and space, and explore optimizations using two-pointer techniques starting from string ends.
Move from brute-force to an optimal two-pointer solution that uses right-to-left backspace handling with hashes, comparing transformed strings without extra memory.
Utilize a two-pointer approach with p1 and p2 at the last indices of strings S and T, skip hashes, and compare characters to return true when matched or false otherwise.
Use the two-pointer technique on string backspacing problems to achieve time complexity o(a+b) and space complexity o(1), and optimize through code submissions.
Learn to implement the longest substring without repeating characters with the sliding window and two-pointer techniques, focusing on contiguous substrings, case sensitivity, and diverse test cases.
Apply a brute force approach to find the longest substring without repeating characters by building substrings from the left, tracking seen characters, and restarting after duplicates to update maximum length.
Outline a brute force solution for the longest substring without repeating characters using left and right pointers and a seen characters map, with complexity notes.
Analyze the longest substring without repeating characters, showing O(n^2) time from nested loops and O(n) space from a hash map, then introduce the sliding window two-pointer optimization.
Learn the sliding window technique to analyze sequential data with left and right pointers, dynamically adjusting the window to solve problems like finding the maximum sum of two contiguous integers.
Apply sliding window concepts to optimize the current substring, tracking seen characters with a hash map. Increase the window when adding new characters and shrink it when duplicates appear.
Apply the sliding window technique to build a substring with unique characters using left and right pointers, a character-index hash map, and a method to update the longest substring.
Apply a sliding window with a hash map and left and right pointers to track the longest unique substring in coding interviews, updating boundaries and achieving linear time and space.
Analyze an optimal JavaScript solution for the longest substring without repeating characters, comparing object versus map usage, and discuss space and time complexity in coding interviews.
Explore palindromes as a common string pattern, learn three pointer techniques—from outside-in, center expansion, and reverse string—and practice ignoring non alphanumeric characters and lowercasing.
Determine whether a string is a palindrome by considering only alphanumeric characters, ignoring case, and using the three approaches from the previous lesson, with regex-based normalization and diverse test cases.
Explore how to decide if a string is almost a palindrome by removing one character, using alphanumeric normalization and three approaches (outside, center, reverse) with practical test cases.
Identify conflicting characters with left-right pointers in the almost palindrome problem, generate two candidate strings by removing one character, and test if either is a palindrome.
Code the solution with left and right pointers and a valid_sub_palindrome helper to verify remaining characters after skipping one, and note the potential use of dynamic programming later.
Master singly linked lists by studying list nodes with value and next, the head-to-null chain, and patterns for detecting cycles in interviews.
Explore how to reverse a linked list by iterating from the head node, handling null and single-node cases, and testing with 1-2-3-4-5.
Think through reversing a linked list before coding by operating on one node at a time from the head, while preserving next and previous references.
Learn the in-place reversal of a linked list by iterating with current, previous, and next to reverse pointers. Analyze its O(n) time and O(1) space, and return the new head.
Master the coding interview: m, n reversals teaches reversing a sublist of a linked list from position m to n using one-based indexing, with edge cases and practical test cases.
Identify the start and end of the sublist using M and N, then reverse that segment in place by relinking next pointers while preserving the rest of the list.
Learn to reverse a sublist of a linked list from position m to n, including edge cases like m equals 1, using a constant-space, linear-time approach.
Flatten a multi-level doubly linked list by merging child lists into the gap between a node and its next. Traverse forward or backward and nullify child pointers.
Develop best-case test cases that reveal the full problem space for merging a multi-level doubly linked list with child pointers, focusing on traversal and pointer updates across levels and children.
Identify the current node, its child, and the child tail to guide merging sublists in a doubly linked list and flatten the structure through careful pointer work.
Traverse the head of the doubly linked list to locate a node with a child and merge the child’s list into the parent by aligning the tail and next/previous pointers.
Brand new course ready for the 2023 hiring season! Join a live online community of over 900,000+ engineers and a course taught by industry experts that have actually worked both in Silicon Valley and Toronto at top tech firms. Graduates of ZTM courses are now working at Google, Tesla, Amazon, Apple, IBM, JP Morgan, Meta + other top tech companies.
This is one student 1 month after taking this course:
"I joined the course when it came out, and after a couple of months studying, practice, and more practice, losing sleep and everything I'm proud to say that I got an offer from GOOGLE!! I still can't believe it, it's incredibly surreal. And I can't thank you and this entire community enough for what you've given me. This year is notorious for how tumultuous it's been, but it's seriously has been a test from the first second of this year.. I've shed many, many tears these past 12 months and could write a book on the experience this year. but i just want to Thank you, thank you, thank you from the bottom of my heart for providing me (and this community) the resources needed to realize my potential that I honestly never saw in myself.. and now that I know i can get this far, I know that this is only the beginning.."
Want to land a job at a great tech company like Google, Microsoft, Meta, Netflix, Amazon, or other companies but you are intimidated by the interview process and the coding questions? Do you find yourself feeling like you get "stuck" every time you get asked a coding question? This course is your answer. Using the strategies, lessons, and exercises in this course, you will learn how to land offers from all sorts of companies. This is the ultimate resource to prepare you for coding interviews. Everything you need in one place!
The goal of the course isn't to tell you: "Do 100 interview questions and hope you memorize their answers." NO! Our goal is to use the hand selected common interview questions to give you a framework to answer ANY interview question that these companies may throw at you. Instead of trying to memorize common questions, we teach you the principles and fundamentals that you can use to notice certain common patterns in questions so that any question that you get, you have a framework to answer and be confident in your programming interview.
You will also get access to our private online community with thousands of developers online to help you get through the course and the interview!
Here is what you will learn to use in this course while answering the interview questions step by step with us:
----Technical----
1. Big O Notation
2. Data Structures Used:
* Arrays
* Hash Tables
* Singly linked lists
* Doubly linked lists
* Stacks
* Queues
* Binary Trees
* Binary Search Trees
* Tries
* N-ary Trees
* Min/Max Heaps
* Priority Queues
* 2-D Arrays/ Matrices
* Graphs
* Adjacency List
* Adjacency Matrix
* Interface Design
3. Algorithmic Paradigms Used:
* Recursion
* Sorting
* Searching
* Tree Traversals
* Graph Traversals
* Breadth First Search
* Depth First Search
* Divide and Conquer
* Greedy Method
* Dynamic Programming
* Backtracking
4. Specific Algorithms Used:
* Hoare's Quickselect Algorithm
* Floyd's Tortoise and Hare Cycle Detection Algorithm
* Bellman-Ford Algorithm
* Dijkstra's Algorithm
* Topological Sort
Unlike most instructors out there, We are not marketers or salespeople. We are senior engineers and programmers who have worked and managed teams of engineers and have been in these interviews both as an interviewee as well as the interviewer.
Our job as instructors will be successful if we are able to help you get your dream job at a big company. This one skill of mastering the coding interview can really change the course of your career and life and we hope you sign up today to see what it can do for your career!
See you inside the course!
Taught by:
Andrei is the instructor of the highest rated Web Development course on Udemy as well as one of the fastest growing. His graduates have moved on to work for some of the biggest tech companies around the world like Apple, Google, JP Morgan, IBM, etc... He has been working as a senior software developer in Silicon Valley and Toronto for many years, and is now taking all that he has learned, to teach programming skills and to help you discover the amazing career opportunities that being a developer allows in life.
Having been a self taught programmer, he understands that there is an overwhelming number of online courses, tutorials and books that are overly verbose and inadequate at teaching proper skills. Most people feel paralyzed and don't know where to start when learning a complex subject matter, or even worse, most people don't have $20,000 to spend on a coding bootcamp. Programming skills should be affordable and open to all. An education material should teach real life skills that are current and they should not waste a student's valuable time. Having learned important lessons from working for Fortune 500 companies, tech startups, to even founding his own business, he is now dedicating 100% of his time to teaching others valuable software development skills in order to take control of their life and work in an exciting industry with infinite possibilities.
Andrei promises you that there are no other courses out there as comprehensive and as well explained. He believes that in order to learn anything of value, you need to start with the foundation and develop the roots of the tree. Only from there will you be able to learn concepts and specific skills(leaves) that connect to the foundation. Learning becomes exponential when structured in this way.
Taking his experience in educational psychology and coding, Andrei's courses will take you on an understanding of complex subjects that you never thought would be possible.
-------
Yihua Zhang is one of the Instructors of Zero To Mastery, one of the highest rated and fastest growing Web Development academies on Udemy. He has been working as a software developer for numerous years in Toronto for some of the largest tech companies in the world. He has also been working as an instructor for more than a decade. He is focused on bringing everything he has learned to help you achieve a new career as a developer, but also give you all the fundamental skills required to flourish in this incredible industry.
Yihua is a self taught developer, so he fully understands the challenges and mindset of coming into this industry from various other backgrounds. He has been on both sides of the table, as both an instructor and student numerous times so he can empathize with the difficulty of learning something new and challenging. Learning itself is a skill that needs to be practiced and improved upon, and he is dedicated to helping you improve and master that skill for yourself. Courses need to be practical, you need to be able to understand why you are learning the things that you are being taught. You need to understand the problem before you know the solution, and he prides himself on teaching you how to build professional, real world applications so you truly understand why you are doing things a specific way. He will teach you the mindset and skillset required to grow as a developer as fast as possible, so you can have the rich and fulfilling life that comes with this career.
Yihua's courses will guide you to build beautifully written and richly featured applications, while truly understanding all the complex concepts you will encounter along the way.