
Sharpen problem-solving with paper and pen, avoiding platform-specific concerns, since most interviews, including Google, are on a whiteboard; perseverance and clear solutions are emphasized.
Merge two sorted arrays into a new sorted array containing all integers, given that all input arrays are sorted, with an example and advice to sketch a solution before continuing.
Explain the time complexity of a function that loops through an array, sorts characters, and prints them, noting linear time, and compare a stack-based reverse output with another method.
Explore the max difference problem, also known as the max profit problem, by analyzing a stock price sequence to determine the best day to buy and sell for maximum profit.
Learn to find the kth last element in a linked list and remove it, illustrated with A B C D and k = 3, yielding A B D.
Explore combinatorics by generating all permutations of a string, like ABC, with a recursive approach. Sketch a recursive solution before continuing.
Explore Towers of Hanoi using recursion to move a stack of disks from a source to a destination via a spare tower, starting with the single-disk base case.
Initialize a three-tower hanoi setup with five disks on tower 1; solve recursively using a spare, then move disks to the destination and print results.
Explore the exponential time complexity of the Towers of Hanoi with a recursive solution described by T(n) = 2T(n-1) + 1, including the base case T(1) = 1 and disk moves via a spare tower.
Breadth-first search traverses a tree level by level, visiting all nodes at each level. It powers shortest-path queries, such as Google Maps directions, and supports social networks and web crawlers.
Define a tree node class with an integer value, left and right children, and a visited flag; provide a constructor and a function to return children, and build a tree.
Visualizes a tree traversal from the root to its children, showing root-first then level-by-level progress as the basis of breadth first search, with a note on pre order traversal.
Explore the depth first search algorithm, its in-order traversal visiting left subtree, then the parent, then the right subtree, and its use in family trees, mazes, and decision trees.
Who This Class is For
The ideal student for this course is someone who wants a comprehensive and easy to follow guide in preparing for coding interviews. They can be someone who's completely new to coding interviews (ie new grad, or someone going through a career change), or someone who hasn't done them in a while and wants to brush up for an upcoming interview.
What You Will Achieve at the End of this Class
What I hope to achieve with you at the end of the class is a better awareness and preparedness of what questions tech companies ask, and how to prepare for those questions. Even if the question isn't exactly the same, you'll recognize the pattern, and be able to start solving and speaking intelligently to the problem.
Steps for the Rest of the Class
Every coding interview I've done (with a few exceptions) has included whiteboarding. If you're coding remotely, it'll most likely be a word document with no compiler. There are some companies that will provide a platform that runs test cases through your program. This class is intended for the majority of companies that still whiteboard.
Therefore, it's smart to use pen(pencil) and paper to follow along with the lectures as I type and make your own notes. Try to solve the problem on your own before you look at the solution, and then compare your solution to mine. How do they differ and why? Each problem set will include a problem statement, a strategy for solving, a solution, and Big O complexity analysis (how efficient is our solution?) Go over the sections that you don't understand, because it will make you feel more confident.