Today's workshop will focus on algorithmic thinking and problem solving.
For each algorithm, make sure to cd
into each folder and run npm install
. We use two libraries for testing: mocha
and chai
, which you will become very familiar with during the rest of the course. You can run these tests using npm t
.
For each problem DO NOT START CODING. Take the time to talk through the problem at hand and existing test specs with your partner(s). Using a whiteboard (or pen && paper), discuss and diagram a potential solution, taking pains to step through it "as your machine would" with one or several of the test specs given.
When you are confident in your approach, feel free to add 1 or more test specs to the [currentProb].spec.js
file, including any edge cases discussed during the planning phase. From there begin to pair program on your solution, using your handwritten code as a guide.
Note that each problem has a bonus piece of extra credit. Please spend some time attempting them (it's okay if you can't complete them) before moving on to the next problem!
Note that these are all classic interview questions sourced from real companies such as Google, Facebook, and even FSA! This should help give you some insight into the kind of planning and communication skills elite engineers are expected to have :)