Skip to content

My solutions to exercises from The Coding Interview Bootcamp: Algorithms + Data Structures

License

Notifications You must be signed in to change notification settings

debradley/AlgoCasts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AlgoCasts

This repository contains notes and exercises from the Udemy course "The Coding Interview Bootcamp: Algorithms + Data Structures" by Stephen Grider. I forked it from his repo so that I can save my solutions to the problems.

Setup

sudo npm i -g jest

Usage

jest reversestring --watch

The Interview Process

Phase 1: Contact

Company evaluates:

  • Your work experience
  • Your side projects
  • Information from any shared contacts

Phase 2: Interview

  • Culture fit
  • Can you code? - the make or break criteria
    • Take home assignment
    • Pair programming
    • Whiteboarding - tool of preference for many large companies and the area where you can most improve, through practice

When you begin practicing, it's more important that you see a lot of problems and get familiar with the process for solving them than it is to get the right answer. Watch the solution if you get too frustrated.

reversestring

My first alternative solution was slightly different from Stephen's. Are writes to the array (my approach) better or worse than allocating a new immutable string on each iteration (his approach)? Profiling should be the ultimate guide but, for programmer happiness, his approach of only using strings felt cleaner.

Problem-specific Lessons

  • The simplest solution requires knowing the standard library API to go from string to array to string
  • reduce is an unexpected solution

General Lessons

  • Avoid the traditional for loop when you can because there are too many ways to make simple mistakes; for...of is easier.
  • use the debugger statement and node inspect to troubleshoot

About

My solutions to exercises from The Coding Interview Bootcamp: Algorithms + Data Structures

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.1%
  • HTML 13.9%