Personal crash course/guide to core CS knowledge that I look to use for interviews or future reference.


Introduction

Ultimately, well-known data structures and algorithms are well known for a reason. While interviewing is incredibly flawed — especially favoring those formally educated in CS (compounding the problems in higher education). I personally hate this process because I'm bad at taking standardized tests, but I do believe all this stuff is learnable. From the interviewer's perspective, interviews like this weed out engineers who either aren't strong communicators or whose knowledge doesn't extend beyond specific frameworks — everyone loves the "T-shaped engineer".

I'm creating this crash course of sorts as a tool to quickly get up to speed with all this knowledge that anyone out of school will quickly forget. Hopefully, this can help some other bad test takers out there in the process.


Data Structures

It's easy to forget the fundamental building blocks of the things we create with code, namely how the information we are manipulating is actually organized and stored — shaping the apparent tradeoffs of using different structures for different problems.

For each data structure below — no matter how often I've actually used them — I've outlined each data structure with the following key points:

  1. How is the data actually organized — what is its Abstract Data Type (ADT)?
  2. How can we manipulate the data structure — what are its methods?
  3. What are some implementations of the data structure (I'll use Java for most of these, but sometimes Go)?
  4. What are some problems that these data structures are used for and what are some signs that this data structure would useful given a problem? (What's the most frequent operation we will be, what is the size of the data, etc.)

Arrays

The classic. An array is an ADT designed to hold a collection of items accessible by an integer index. What this means from the machine's perspective is that an array is a lot like a chunk of memory with an address, a specific size, and specific unit size. In practice, we can create this chunk of memory, know its address and jump to any memory unit within that block immediately.