Thumbtack
Course Description
Bored by the academic approach of most data structures and algorithms courses? This is for you! You'll learn to solve algorithms and analyze space and time complexity in both an interview setting and in your day-to-day development. Following along with the course, you'll practice algorithms with common interview questions using a handful of algorithm techniques. Take a practical look at recursion and learn to optimize your solutions using divide-and-conquer. Implement merge sort and quicksort and understand tradeoffs of both approaches. Plus, get started with dynamic programming and memoization!
This course and others like it are available as part of our Frontend Masters video subscription.
Preview
CloseCourse Details
Published: June 5, 2018
Learn Straight from the Experts Who Shape the Modern Web
Your Path to Senior Developer and Beyond
- 200+ In-depth courses
- 18 Learning Paths
- Industry Leading Experts
- Live Interactive Workshops
Table of Contents
Introduction
Section Duration: 4 minutes
- Bianca Gandolfo introduces herself and talks about why algorithms are essential to all engineers.
Space & Time Complexity
Section Duration: 41 minutes
- Bianca introduces the concept of time complexity, space complexity, and understanding algorithmic speed. Bianca answers questions from students.
- Time complexity of Native JavaScript methods and expressions such as property access, loops, and native array methods. Bianca answers questions from students about various methods such as map, reduce, and sort.
- Bianca reviews the different big O notations: constant, linear, quadratic, logarithmic, and exponential.
- After discussing space complexity, Bianca reviews Big O notations and time complexity.
- Bianca dissects function with a loop to reason about the time complexity.
- Bianca walks through a property lookup in an array.length and measures time complexity.
- Bianca contrasts different array methods and their respective time complexity.
Optimization with Caching
Section Duration: 57 minutes
- Bianca reviews two common ways to speed up algorithms through caching previous values significantly.
- In this exercise, students Implement unique sort, which removes duplicates from an array.
- Bianca reviews the breadcrumbs caching technique while walking through the unique sort solution.
- Bianca discusses the difference between memoizing and the breadcrumbs caching technique.
- In this exercise, students use a global cache to memoize.
- Bianca walks through the Basic Memoization Exercise and answers questions from students.
- In this exercise, students improve the memoize function by moving the cache into a closure.
- Bianca walks through the Memoization with Closure Exercise to show how to use a closure to make the cache local. Bianca answers questions from students.
- In this exercise, students make a memoize function generic by passing in the function rather than hardcoding a function.
- Bianca reviews the previous two exercises and walks through how to transform the hardcoded memoize function into a generic memoize function.
- Bianca wraps up discussing the different caching techniques by reviewing the trade-off between time complexity and space complexity.
Recursion
Section Duration: 53 minutes
- Bianca introduces recursion, which is when a function calls itself, and its importance in programming.
- Bianca demonstrates recursion through the Call Stack Game, which shows how JavaScript executes functions with the call stack. Bianca answers questions from students.
- Bianca walks through an example of loop implementing through the use of recursion.
- Bianca looks at how the factorial algorithm would be implemented with a for() loop. The loop starts at the number 2 and continues to multiply the numbers together until the desired factorial is reached.
- Bianca reviews the differences and benefit of recursion and a loop.
- Bianca introduces wrapper functions as a pattern for recursion.
- Bianca walks through the accumulator technique, which gathers all callbacks returned values.
- In this exercise, students translate a recursive pattern into an iterative loop.
- Bianca walks through the solution to Iterative Loop Exercise.
- In this exercise, students write their own recursive factorial method.
- Bianca walks through the solution to Recursive Factorial & Memoize Exercise.
Divide & Conquer
Section Duration: 46 minutes
- Bianca introduces what divide and conquer method to sorting. After data is separated into smaller lists, the merge step combines two sorted lists into one sorted list.
- In this exercise, students implement linear search.
- Bianca walks through the solution to Linear Search Exercise. Bianca answers questions from students.
- Bianca illustrates binary search, which allows a search of a sorted array by repeatedly splitting the array in half. Binary search is fast Since with each iteration half of the array is determined to be undesired, instead of just one wrong value.
- Bianca reviews divide and conquer.
- Bianca discusses the two main types of sorting: naive and divide & conquer. Bianca answers questions from students.
- Bianca reviews merge sort, which is an algorithm that takes a "divide and conquer" approach to sorting. With merge sort, data is separated into smaller lists, the merge step combines two sorted lists into one sorted list.
- Bianca walks through a code example of merge sort.
- In this exercise, students implement bubble sort and merge sort.
- Bianca walks through the first part of the Bubble Sort & Merge Sort Exercise by coding the solution to bubble sort.
- Bianca walks through the last part of the Bubble Sort & Merge Sort Exercise by coding the solution to mergesort. Bianca answers questions from students.
Greedy Algorithms
Section Duration: 21 minutes
- Bianca introduces the greedy algorithm, which is an algorithmic paradigm that follows the problem-solving course of making the locally optimal choice.
- Bianca walks through a "make change" problem to demonstrate the greedy algorithm.
- Bianca reviews the brute force approach, which calculates every single combination possible and keeps track of the minimum. Bianca answers questions from students.
Dynamic Algorithms
Section Duration: 16 minutes
- Bianca discusses dynamic programming, which is a data optimization technique. The dynamic approach caches values to avoid repeated calculations. Bianca answers questions from students.
- Binca reviews memoization and recursive approach to the "make change" problem.
- Bianca wraps up "A Practical Guide to Algorithms" course by reviewing the landscape of data structures and algorithms. Bianca answers questions from students.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops