Complete Intro to Computer Science

Brian Holt

Brian Holt

SQLite Cloud
8 hours, 59 minutes CC
Complete Intro to Computer Science

Course Description

Pass those difficult algorithms and data structures interview questions asked by the largest silicon valley companies. Even if you didn’t go to school for it, gain the advantages and skills a traditional computer science education can give you. We’ll tackle the big computer science concepts: Algorithms and Big O Analysis, Recursion, Sorting, Data Structures, AVL Trees, Binary Search Trees, Tree Traversals, and Path Finding.

This course and others like it are available as part of our Frontend Masters video subscription.

Preview
Close

Course Details

Published: July 6, 2021

Learning Paths

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
Get Unlimited Access Now

Table of Contents

Introduction

Section Duration: 15 minutes
  • Introduction
    Brian Holt introduces the course by providing a brief overview of the course website, diving into some personal history with computer science, and discussing some reasons someone would want to learn computer science. The main goal of this course is to provide students with methods of structured thinking and logic.
  • Code Setup
    Brian walks through setting up the exercises for the course, how the course code is organized, and some of the features that will be used on CodeSandbox. The Github link for running a local setup is also provided in this segment.

Algorithm Analysis

Section Duration: 51 minutes
  • Big O Time Complexity
    Brian discusses and demonstrates using the Big O method to analyze the efficiency of algorithms without getting too detailed and the effect increasing the complexity of a function has on the run time. A student's question regarding best practice when squaring variables compared to using constants is also covered in this segment.
  • Why Use Big O
    Brian discusses how to easier determine the appropriate Big O for a process and demonstrates some practical applications of Big O including a comment system with a filtering ability. The key to determining the appropriate amount of Big O is getting as much context of the algorithm as possible.
  • Spatial Complexity
    Brian discusses spatial complexity as how much storage space is required for an algorithm to complete and the different types including: linear, logarithmic, constant, and quadratic. Student questions regarding if network transfer is considered spatial complexity, how this applies to functional programming, and what's driving these constraints are also covered in this segment.
  • Big O Trade-Offs
    Brian discusses the importance of being able to talk about the trade offs when deciding the amount of complexity to allow an algorithm. Some guiding principles when deciding the "better" Big O amount are provided and discussed in this segment. A student's question regarding how to best handle scaling problems is also covered in this segment.

Iterative Sorts

Section Duration: 41 minutes
  • Bubble Sort
    Brian discusses the bubble sorting algorithm which compares two items that are alongside each other in an array and swaps them if out of order. The computational complexity of the bubble sort algorithm will grow exponentially with larger arrays while the spatial complexity stays constant.
  • Bubble Sort Practice
    Brian provides a short exercise to practice and visualize bubble sorting an array of numbers and then live codes the solution. A student's question regarding if the function's if check is intentionally going out of bounds is also covered in this segment.
  • Insertion Sort
    Brian discusses insertion sort which will continually shift numbers over in the array until they reach their appropriate location. The worst, best, and average case scenarios for using this sort type are also discussed in this segment.
  • Insertion Sort Practice
    Brian provides a short exercise to practice and visualize insertion sorting an array of numbers and then live codes the solution. Examples with larger arrays are also provided in this segment to better visually demonstrate how insertion sorts an array.

Recursive Sorts

Section Duration: 1 hour, 31 minutes
  • Recursion
    Brian discusses recursive functions as functions that call upon themselves, the basic mechanics, when recursive functions are useful, and provides an example using the Fibonacci sequence. Student's questions regarding if the map function is recursive, what happens if the max value is infinity, and what the purpose of list parameter in the example is are also covered in this segment.
  • Recursion Practice: Nested Addition
    Brian provides a short exercise to practice recursion with a nested addition example and then live codes the solution. A student's question regarding the time complexity of the recursion solution is also covered in this segment.
  • Recursion Practice: Factorials
    Brian provides a short exercise to practice recursion with a factorials example and then live codes the solution. This is example is fairly similar to the fibonacci example, but is little different to help solidify writing recursion functions. Students questions regarding how to conceptualize a recursive function and if it is correct to think of recursion like a promise are also covered in this segment.
  • Merge Sort
    Brian discussion applying recursion to sort a list with merge sorting, walks through sorting a simple array, and provides a visual example. Recursion sorting will break an array down into smaller parts until the length is one or zero, which means it is already sorted.
  • Merge Sort Practice
    Brian discusses the Big O and spatial complexity of merge sorting an array, provides a short exercise to practice merge sorting, and live codes the solution to the example. Every case of using merge sorting is the best, worst, and average as the array will always be broken down to lists of one.
  • Merge Sort Q&A
    Brian answers student's questions regarding why left and right are being concatenated and what the policy for using built in JavaScript methods. Questions also covered in this segment include: if merge can be made recursive and if the solution could be completed in one function call.
  • Quick Sort
    Brian discusses sorting arrays using quick sort, the Big O, spatial complexity, and possible variations of quick sort including a memory efficient version and quiicksort3. Quick sort will choose a pivot point, put values larger and smaller than the pivot into seperate arrays, return the arrays with lengths zero or one, and repeat until the array is sorted.
  • Quick Sort Practice
    Brian provides a short exercise to practice quick sorting an array and live codes the example's solution. A student's question regarding what happens if there are duplicates in the arrays is also covered in this segment.
  • Quick Sort Q&A
    Brian answers students questions regarding an error involving missing the - 1 in nums.length -1, if overwriting the variables would improve the memory, how to use a for of loop to solve the example, and walks through of the time complexity of this code. Student questions regarding how to decide what the log(n) is, if it makes sense to choose pivots outside the data set, and if choosing the perfect pivot is worth it are also covered in this segment.

Non-Comparison Sorts

Section Duration: 29 minutes
  • Radix Sort
    Brian discusses a non comparison sorting called radix sort, a walk through of an example array, and the Big O of this sorting method. Radix sorting will sort the array values into buckets for however many places there are in the largest number. Some starting helper functions for the radix sorting practice is also provided in this segment.
  • Radix Sort Practice
    Brian provides a short exercise to practice radix sorting and then live codes the solution to the example with visual sorting snapshots. Student questions regarding what the constant mod is in the getDigit function and if the getLongestNumber function defeats the purpose of the entire sort are also covered in this segment.

Binary Search

Section Duration: 11 minutes
  • Binary Search
    Brian discusses searching for a particular element in an array using a binary search algorithm to keep cutting the array in half until the correct value is found. Unlike a linear search, a binary search method will only work if the array is already sorted. A student's question regarding if a binary search is best done recursively is also covered in this segment.
  • Binary Search Practice
    Brian provides two short exercises of searching for student IDs to practice linear and binary searching and then live codes the solutions to the examples.

Lists

Section Duration: 33 minutes
  • ArrayList
    Brian discusses the ArrayList data structure and how to implement an array using just objects. JavaScript arrays are set normal arrays and there is no choice beyond that. No matter how big the ArrayList is, array lookups take the same amount of time.
  • ArrayList Practice
    Brian provides a short exercise to practice implementing an object with ArrayList and then live codes the solution. Student questions regarding what to do if the index is not found, could the delete method be reused for pop, and if the ArrayList should have a peak function.
  • LinkedList
    Brian discusses the LinkedList data structure which is composed of nodes that point to the next node in the list. Since the LinkedList data structure is not sequential in memory additions and deletions are easy, but look ups become more difficult.
  • LinkedList Practice
    Brian provides a short exercise to practice implementing an object with LinkedList and then live codes the solution. A student's question regarding the index -1 in _find(index) is also covered in this segment.

Trees

Section Duration: 2 hours, 15 minutes

Applying Tree Algorithms

Section Duration: 1 hour, 42 minutes

Other Data Structures

Section Duration: 17 minutes
  • Bloom Filters
    Brian discusses bloom filters which are an interesting data structure which are designed to tell you quickly and efficiently if an item is in a set. When you add more items to a bloom filter, you'll increase your false positive rate which can be mitigated by having a larger array.
  • Bloom Practice
    Brian provides a short exercise to practice implementing bloom filters and then live codes the solution. A students question regarding if JavaScript would dynamically allocate for you is also covered in this segment.

Wrapping Up

Section Duration: 9 minutes
  • Wrapping Up
    Brian wraps up the course by providing advice on how to go about solving computer science questions in the future. Student questions including what is impressive in an interview and what is a good approach for solving a computer science problem are also covered.
Thanks for your awesome course on intro to computer science Brian Holt 😎 I learnt a lot about data structures and algorithms and decided to use C# to write the algos.
Samson Amaugo

Samson Amaugo

swacblooms

For those without computer science degrees prepping for interviews or those who need to brush up on these concepts, I cannot recommend Frontend Masters course on Intro to Computer Science by Brian Holt enough
Brock Davis

Brock Davis

brockneedcoffee

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now