Merge branch 'master' into develop

# Conflicts:
#	README.md
This commit is contained in:
Vortana Say
2021-02-14 05:05:19 -06:00
22 changed files with 9181 additions and 3223 deletions

381
README.md
View File

@@ -20,6 +20,11 @@
- [Español](translations/README-es.md)
- [Português Brasileiro](translations/README-ptbr.md)
- [Polish](translations/README-pl.md)
- [繁體中文](translations/README-tw.md)
- [Japanese (日本語)](translations/README-ja.md)
- [Russian](translations/README-ru.md)
- [German](translations/README-de.md)
- [Bahasa Indonesia](translations/README-id.md)
- [ខ្មែរ - Khmer](translations/README-kh.md)
</details>
@@ -29,20 +34,17 @@
- [हिन्दी](https://github.com/jwasham/coding-interview-university/issues/81)
- [עברית](https://github.com/jwasham/coding-interview-university/issues/82)
- [Bahasa Indonesia](https://github.com/jwasham/coding-interview-university/issues/101)
- [Arabic](https://github.com/jwasham/coding-interview-university/issues/98)
- [Turkish](https://github.com/jwasham/coding-interview-university/issues/90)
- [French](https://github.com/jwasham/coding-interview-university/issues/89)
- [Russian](https://github.com/jwasham/coding-interview-university/issues/87)
- [Ukrainian](https://github.com/jwasham/coding-interview-university/issues/106)
- [Korean(한국어)](https://github.com/jwasham/coding-interview-university/issues/118)
- [Telugu](https://github.com/jwasham/coding-interview-university/issues/117)
- [Urdu](https://github.com/jwasham/coding-interview-university/issues/140)
- [Urdu](https://github.com/jwasham/coding-interview-university/issues/519)
- [Thai](https://github.com/jwasham/coding-interview-university/issues/156)
- [Greek](https://github.com/jwasham/coding-interview-university/issues/166)
- [Italian](https://github.com/jwasham/coding-interview-university/issues/170)
- [Malayalam](https://github.com/jwasham/coding-interview-university/issues/239)
- [Japanese (日本語)](https://github.com/jwasham/coding-interview-university/issues/257)
</details>
@@ -75,8 +77,8 @@ If you want to be a reliability engineer or operations engineer, study more from
- [Book List](#book-list)
- [Before you Get Started](#before-you-get-started)
- [What you Won't See Covered](#what-you-wont-see-covered)
- [Prerequisite Knowledge](#prerequisite-knowledge)
- [The Daily Plan](#the-daily-plan)
- [Prerequisite Knowledge](#prerequisite-knowledge)
- [Algorithmic complexity / Big-O / Asymptotic analysis](#algorithmic-complexity--big-o--asymptotic-analysis)
- [Data Structures](#data-structures)
- [Arrays](#arrays)
@@ -201,9 +203,14 @@ I'm using Github's special markdown flavor, including tasks lists to check progr
**Create a new branch so you can check items like this, just put an x in the brackets: [x]**
Fork a branch and follow the commands below
Fork the GitHub repo https://github.com/jwasham/coding-interview-university by clicking on the Fork button
Clone to your local repo
`git clone git@github.com:<your_github_username>/coding-interview-university.git`
`git checkout -b progress`
`git remote add jwasham https://github.com/jwasham/coding-interview-university`
@@ -216,7 +223,9 @@ I'm using Github's special markdown flavor, including tasks lists to check progr
`git commit -m "Marked x"`
`git rebase jwasham/master`
`git rebase jwasham/main`
`git push --set-upstream origin progress`
`git push --force`
@@ -240,16 +249,16 @@ Sometimes the classes are not in session so you have to wait a couple of months,
## Interview Process & General Interview Prep
- [ ] [ABC: Always Be Coding](https://medium.com/always-be-coding/abc-always-be-coding-d5f8051afce2#.4heg8zvm4)
- [ ] [How to Pass the Engineering Interview in 2021](https://davidbyttow.medium.com/how-to-pass-the-engineering-interview-in-2021-45f1b389a1)
- [ ] [Whiteboarding](https://medium.com/@dpup/whiteboarding-4df873dbba2e#.hf6jn45g1)
- [ ] [Effective Whiteboarding during Programming Interviews](http://www.coderust.com/blog/2014/04/10/effective-whiteboarding-during-programming-interviews/)
- [ ] [Demystifying Tech Recruiting](https://www.youtube.com/watch?v=N233T0epWTs)
- [ ] How to Get a Job at the Big 4:
- [ ] [How to Get a Job at the Big 4 - Amazon, Facebook, Google & Microsoft (video)](https://www.youtube.com/watch?v=YJZCUhxNCv8)
- [ ] [How to Get a Job at the Big 4.1 (Follow-up video)](https://www.youtube.com/watch?v=6790FVXWBw8&feature=youtu.be)
- [ ] Cracking The Coding Interview Set 1:
- [ ] [Gayle L McDowell - Cracking The Coding Interview (video)](https://www.youtube.com/watch?v=rEJzOhC5ZtQ)
- [ ] [Cracking the Coding Interview with Author Gayle Laakmann McDowell (video)](https://www.youtube.com/watch?v=aClxtDcdpsQ)
- [ ] Cracking the Facebook Coding Interview
- [ ] Cracking the Facebook Coding Interview:
- [ ] [The Approach](https://www.youtube.com/watch?v=wCl9kvQGHPI)
- [ ] [Problem Walkthrough](https://www.youtube.com/watch?v=4UWDyJq8jZg)
- [ ] Prep Course:
@@ -261,6 +270,8 @@ Sometimes the classes are not in session so you have to wait a couple of months,
- A free Python centric data structures and algorithms course.
- [ ] [Data Structures and Algorithms Nanodegree! (Udacity paid Nanodegree)](https://www.udacity.com/course/data-structures-and-algorithms-nanodegree--nd256):
- Get hands-on practice with over 100 data structures and algorithm exercises and guidance from a dedicated mentor to help prepare you for interviews and on-the-job scenarios.
- [ ] [Grokking the Behavioral Interview (Educative free course)](https://www.educative.io/courses/grokking-the-behavioral-interview):
- Many times, its not your technical competency that holds you back from landing your dream job, its how you perform on the behavioral interview.
## Pick One Language for the Interview
@@ -275,7 +286,7 @@ You could also use these, but read around first. There may be caveats:
- JavaScript
- Ruby
Here is an article I wrote about choosing a language for the interview: [Pick One Language for the Coding Interview](https://startupnextdoor.com/important-pick-one-language-for-the-coding-interview/)
Here is an article I wrote about choosing a language for the interview: [Pick One Language for the Coding Interview](https://startupnextdoor.com/important-pick-one-language-for-the-coding-interview/).
You need to be very comfortable in the language and be knowledgeable.
@@ -327,6 +338,9 @@ I haven't read these two, but they are highly rated and written by Sedgewick. He
- [ ] [Algorithms in C++, Parts 1-4: Fundamentals, Data Structure, Sorting, Searching](https://www.amazon.com/Algorithms-Parts-1-4-Fundamentals-Structure/dp/0201350882/)
- [ ] [Algorithms in C++ Part 5: Graph Algorithms](https://www.amazon.com/Algorithms-Part-Graph-3rd-Pt-5/dp/0201361183/)
- [ ] [Open Data Structures in C++](https://opendatastructures.org/ods-cpp.pdf)
- Rich and detailed collection of Data Structures and Algorithms
- Great for first-timers
If you have a better recommendation for C++, please let me know. Looking for a comprehensive resource.
@@ -342,16 +356,16 @@ OR:
- [ ] [Data Structures and Algorithms in Java](https://www.amazon.com/Data-Structures-Algorithms-Michael-Goodrich/dp/1118771338/)
- by Goodrich, Tamassia, Goldwasser
- used as optional text for CS intro course at UC Berkeley
- see my book report on the Python version below. This book covers the same topics.
- see my book report on the Python version below. This book covers the same topics
### Python
- [ ] [Data Structures and Algorithms in Python](https://www.amazon.com/Structures-Algorithms-Python-Michael-Goodrich/dp/1118290275/)
- by Goodrich, Tamassia, Goldwasser
- I loved this book. It covered everything and more.
- I loved this book. It covered everything and more
- Pythonic code
- my glowing book report: https://startupnextdoor.com/book-report-data-structures-and-algorithms-in-python/
- [ ] [Open Data Structures in Python](https://opendatastructures.org/ods-python.pdf)
## Before you Get Started
@@ -362,26 +376,26 @@ Here are some mistakes I made so you'll have a better experience.
### 1. You Won't Remember it All
I watched hours of videos and took copious notes, and months later there was much I didn't remember. I spent 3 days going
through my notes and making flashcards so I could review.
through my notes and making flashcards, so I could review.
Read please so you won't make my mistakes:
Please, read so you won't make my mistakes:
[Retaining Computer Science Knowledge](https://startupnextdoor.com/retaining-computer-science-knowledge/).
A course recommended to me (haven't taken it): [Learning how to Learn](https://www.coursera.org/learn/learning-how-to-learn)
A course recommended to me (haven't taken it): [Learning how to Learn](https://www.coursera.org/learn/learning-how-to-learn).
### 2. Use Flashcards
To solve the problem, I made a little flashcards site where I could add flashcards of 2 types: general and code.
Each card has different formatting.
I made a mobile-first website so I could review on my phone and tablet, wherever I am.
I made a mobile-first website, so I could review on my phone and tablet, wherever I am.
Make your own for free:
- [Flashcards site repo](https://github.com/jwasham/computer-science-flash-cards)
- [My flash cards database (old - 1200 cards)](https://github.com/jwasham/computer-science-flash-cards/blob/master/cards-jwasham.db):
- [My flash cards database (new - 1800 cards)](https://github.com/jwasham/computer-science-flash-cards/blob/master/cards-jwasham-extreme.db):
- [My flash cards database (old - 1200 cards)](https://github.com/jwasham/computer-science-flash-cards/blob/main/cards-jwasham.db):
- [My flash cards database (new - 1800 cards)](https://github.com/jwasham/computer-science-flash-cards/blob/main/cards-jwasham-extreme.db):
Keep in mind I went overboard and have cards covering everything from assembly language and Python trivia to machine learning and statistics. It's way too much for what's required.
@@ -392,16 +406,16 @@ your brain.
An alternative to using my flashcard site is [Anki](http://ankisrs.net/), which has been recommended to me numerous times. It uses a repetition system to help you remember.
It's user-friendly, available on all platforms and has a cloud sync system. It costs $25 on iOS but is free on other platforms.
My flashcard database in Anki format: https://ankiweb.net/shared/info/25173560 (thanks [@xiewenya](https://github.com/xiewenya))
My flashcard database in Anki format: https://ankiweb.net/shared/info/25173560 (thanks [@xiewenya](https://github.com/xiewenya)).
### 3. Start doing coding interview questions while you're learning data structures and algorithms,
### 3. Start doing coding interview questions while you're learning data structures and algorithms
You need to apply what you're learning to solving problems, or you'll forget. I made this mistake. Once you've learned a topic,
and feel comfortable with it, like linked lists, open one of the coding interview books and do a couple of questions regarding
linked lists. Then move on to the next learning topic. Then later, go back and do another linked list problem,
or recursion problem, or whatever. But keep doing problems while you're learning. You're not being hired for knowledge,
but how you apply the knowledge. There are several books and sites I recommend.
See here for more: [Coding Question Practice](#coding-question-practice)
You need to apply what you're learning to solving problems, or you'll forget. I made this mistake. Once you've learned a topic,
and feel comfortable with it, like linked lists, open one of the coding interview books and do a couple of questions regarding
linked lists. Then move on to the next learning topic. Then later, go back and do another linked list problem,
or recursion problem, or whatever. But keep doing problems while you're learning. You're not being hired for knowledge,
but how you apply the knowledge. There are several books and sites I recommend.
See here for more: [Coding Question Practice](#coding-question-practice).
### 4. Review, review, review
@@ -411,7 +425,7 @@ Take a break from programming problems for a half hour and go through your flash
### 5. Focus
There are a lot of distractions that can take up valuable time. Focus and concentration are hard. Turn on some music
There are a lot of distractions that can take up valuable time. Focus and concentration are hard. Turn on some music
without lyrics and you'll be able to focus pretty well.
## What you won't see covered
@@ -427,19 +441,19 @@ These are prevalent technologies but not part of this study plan:
Some subjects take one day, and some will take multiple days. Some are just learning with nothing to implement.
Each day I take one subject from the list below, watch videos about that subject, and write an implementation in:
- C - using structs and functions that take a struct * and something else as args.
- C - using structs and functions that take a struct * and something else as args
- C++ - without using built-in types
- C++ - using built-in types, like STL's std::list for a linked list
- Python - using built-in types (to keep practicing Python)
- and write tests to ensure I'm doing it right, sometimes just using simple assert() statements
- You may do Java or something else, this is just my thing.
- You may do Java or something else, this is just my thing
You don't need all these. You need only [one language for the interview](#pick-one-language-for-the-interview).
Why code in all of these?
- Practice, practice, practice, until I'm sick of it, and can do it with no problem (some have many edge cases and bookkeeping details to remember)
- Work within the raw constraints (allocating/freeing memory without help of garbage collection (except Python or Java))
- Make use of built-in types so I have experience using the built-in tools for real-world use (not going to write my own linked list implementation in production)
- Make use of built-in types, so I have experience using the built-in tools for real-world use (not going to write my own linked list implementation in production)
I may not have time to do all of these for every subject, but I'll try.
@@ -455,11 +469,11 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
## Prerequisite Knowledge
- [ ] **Learn C**
- C is everywhere. You'll see examples in books, lectures, videos, *everywhere* while you're studying.
- [ ] [C Programming Language, Vol 2](https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628)
- C is everywhere. You'll see examples in books, lectures, videos, *everywhere* while you're studying
- [ ] [The C Programming Language, Vol 2](https://www.amazon.com/Programming-Language-Brian-W-Kernighan/dp/0131103628)
- This is a short book, but it will give you a great handle on the C language and if you practice it a little
you'll quickly get proficient. Understanding C helps you understand how programs and memory work.
- [answers to questions](https://github.com/lekkas/c-algorithms)
you'll quickly get proficient. Understanding C helps you understand how programs and memory work
- [Answers to questions](https://github.com/lekkas/c-algorithms)
- [ ] **How computers process a program:**
- [ ] [How CPU executes a program (video)](https://www.youtube.com/watch?v=XM4lGflQFvA)
@@ -471,14 +485,14 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
## Algorithmic complexity / Big-O / Asymptotic analysis
- Nothing to implement
- There are a lot of videos here. Just watch enough until you understand it. You can always come back and review.
- If some of the lectures are too mathy, you can jump down to the bottom and watch the discrete mathematics videos to get the background knowledge.
- There are a lot of videos here. Just watch enough until you understand it. You can always come back and review
- If some lectures are too mathy, you can jump down to the bottom and watch the discrete mathematics videos to get the background knowledge
- [ ] [Harvard CS50 - Asymptotic Notation (video)](https://www.youtube.com/watch?v=iOq5kSKqeR4)
- [ ] [Big O Notations (general quick tutorial) (video)](https://www.youtube.com/watch?v=V6mKVRU1evU)
- [ ] [Big O Notation (and Omega and Theta) - best mathematical explanation (video)](https://www.youtube.com/watch?v=ei-A_wy5Yxw&index=2&list=PL1BaGV1cIH4UhkL8a9bJGG356covJ76qN)
- [ ] Skiena:
- [video](https://www.youtube.com/watch?v=gSyDMtdPNpU&index=2&list=PLOtl7M3yp-DV69F32zdK7YJcNXpTunF2b)
- [slides](http://www3.cs.stonybrook.edu/~algorith/video-lectures/2007/lecture2.pdf)
- [slides](https://archive.org/details/lecture2_202008)
- [ ] [A Gentle Introduction to Algorithm Complexity Analysis](http://discrete.gr/complexity/)
- [ ] [Orders of Growth (video)](https://www.coursera.org/lecture/algorithmic-thinking-1/orders-of-growth-6PKkX)
- [ ] [Asymptotics (video)](https://www.coursera.org/lecture/algorithmic-thinking-1/asymptotics-bXAtM)
@@ -496,17 +510,13 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- ### Arrays
- Implement an automatically resizing vector.
- [ ] Description:
- [Arrays (video)](https://www.coursera.org/learn/data-structures/lecture/OsBSF/arrays)
- [Arrays (video)](https://www.coursera.org/lecture/data-structures/arrays-OsBSF)
- [UC Berkeley CS61B - Linear and Multi-Dim Arrays (video)](https://archive.org/details/ucberkeley_webcast_Wp8oiO_CZZE) (Start watching from 15m 32s)
- [Basic Arrays (video)](https://archive.org/details/0102WhatYouShouldKnow/02_04-basicArrays.mp4)
- [Multi-dim (video)](https://archive.org/details/0102WhatYouShouldKnow/02_05-multidimensionalArrays.mp4)
- [Dynamic Arrays (video)](https://www.coursera.org/learn/data-structures/lecture/EwbnV/dynamic-arrays)
- [Dynamic Arrays (video)](https://www.coursera.org/lecture/data-structures/dynamic-arrays-EwbnV)
- [Jagged Arrays (video)](https://www.youtube.com/watch?v=1jtrQqYpt7g)
- [Jagged Arrays (video)](https://archive.org/details/0102WhatYouShouldKnow/02_06-jaggedArrays.mp4)
- [Resizing arrays (video)](https://archive.org/details/0102WhatYouShouldKnow/03_01-resizableArrays.mp4)
- [ ] Implement a vector (mutable array with automatic resizing):
- [ ] Practice coding using arrays and pointers, and pointer math to jump to an index instead of using indexing.
- [ ] new raw data array with allocated memory
- [ ] New raw data array with allocated memory
- can allocate int array under the hood, just not use its features
- start with 16, or if starting number is greater, use power of 2 - 16, 32, 64, 128
- [ ] size() - number of items
@@ -532,20 +542,20 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- ### Linked Lists
- [ ] Description:
- [ ] [Singly Linked Lists (video)](https://www.coursera.org/learn/data-structures/lecture/kHhgK/singly-linked-lists)
- [ ] [Singly Linked Lists (video)](https://www.coursera.org/lecture/data-structures/singly-linked-lists-kHhgK)
- [ ] [CS 61B - Linked Lists 1 (video)](https://archive.org/details/ucberkeley_webcast_htzJdKoEmO0)
- [ ] [CS 61B - Linked Lists 2 (video)](https://archive.org/details/ucberkeley_webcast_-c4I3gFYe3w)
- [ ] [C Code (video)](https://www.youtube.com/watch?v=QN6FPiD0Gzo)
- not the whole video, just portions about Node struct and memory allocation.
- not the whole video, just portions about Node struct and memory allocation
- [ ] Linked List vs Arrays:
- [Core Linked Lists Vs Arrays (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/rjBs9/core-linked-lists-vs-arrays)
- [In The Real World Linked Lists Vs Arrays (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/QUaUd/in-the-real-world-lists-vs-arrays)
- [Core Linked Lists Vs Arrays (video)](https://www.coursera.org/lecture/data-structures-optimizing-performance/core-linked-lists-vs-arrays-rjBs9)
- [In The Real World Linked Lists Vs Arrays (video)](https://www.coursera.org/lecture/data-structures-optimizing-performance/in-the-real-world-lists-vs-arrays-QUaUd)
- [ ] [why you should avoid linked lists (video)](https://www.youtube.com/watch?v=YQs6IC-vgmo)
- [ ] Gotcha: you need pointer to pointer knowledge:
(for when you pass a pointer to a function that may change the address where that pointer points)
This page is just to get a grasp on ptr to ptr. I don't recommend this list traversal style. Readability and maintainability suffer due to cleverness.
- [Pointers to Pointers](https://www.eskimo.com/~scs/cclass/int/sx8.html)
- [ ] implement (I did with tail pointer & without):
- [ ] Implement (I did with tail pointer & without):
- [ ] size() - returns number of data elements in list
- [ ] empty() - bool returns true if empty
- [ ] value_at(index) - returns the value of the nth item (starting at 0 for first)
@@ -561,19 +571,16 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- [ ] reverse() - reverses the list
- [ ] remove_value(value) - removes the first item in the list with this value
- [ ] Doubly-linked List
- [Description (video)](https://www.coursera.org/learn/data-structures/lecture/jpGKD/doubly-linked-lists)
- [Description (video)](https://www.coursera.org/lecture/data-structures/doubly-linked-lists-jpGKD)
- No need to implement
- ### Stack
- [ ] [Stacks (video)](https://www.coursera.org/learn/data-structures/lecture/UdKzQ/stacks)
- [ ] [Using Stacks Last-In First-Out (video)](https://archive.org/details/0102WhatYouShouldKnow/05_01-usingStacksForLast-inFirst-out.mp4)
- [ ] Will not implement. Implementing with array is trivial.
- [ ] [Stacks (video)](https://www.coursera.org/lecture/data-structures/stacks-UdKzQ)
- [ ] Will not implement. Implementing with array is trivial
- ### Queue
- [ ] [Using Queues First-In First-Out(video)](https://archive.org/details/0102WhatYouShouldKnow/05_03-usingQueuesForFirst-inFirst-out.mp4)
- [ ] [Queue (video)](https://www.coursera.org/lecture/data-structures/queues-EShpq)
- [ ] [Circular buffer/FIFO](https://en.wikipedia.org/wiki/Circular_buffer)
- [ ] [Priority Queues (video)](https://archive.org/details/0102WhatYouShouldKnow/05_04-priorityQueuesAndDeques.mp4)
- [ ] Implement using linked-list, with tail pointer:
- enqueue(value) - adds value at position at tail
- dequeue() - returns value and removes least recently added element (front)
@@ -600,18 +607,14 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- [ ] [(Advanced) Perfect hashing (video)](https://www.youtube.com/watch?v=N0COwN14gt0&list=PL2B4EEwhKD-NbwZ4ezj7gyc_3yNrojKM9&index=4)
- [ ] Online Courses:
- [ ] [Understanding Hash Functions (video)](https://archive.org/details/0102WhatYouShouldKnow/06_02-understandingHashFunctions.mp4)
- [ ] [Using Hash Tables (video)](https://archive.org/details/0102WhatYouShouldKnow/06_03-usingHashTables.mp4)
- [ ] [Supporting Hashing (video)](https://archive.org/details/0102WhatYouShouldKnow/06_04-supportingHashing.mp4)
- [ ] [Language Support Hash Tables (video)](https://archive.org/details/0102WhatYouShouldKnow/06_05-languageSupportForHashTables.mp4)
- [ ] [Core Hash Tables (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/m7UuP/core-hash-tables)
- [ ] [Core Hash Tables (video)](https://www.coursera.org/lecture/data-structures-optimizing-performance/core-hash-tables-m7UuP)
- [ ] [Data Structures (video)](https://www.coursera.org/learn/data-structures/home/week/4)
- [ ] [Phone Book Problem (video)](https://www.coursera.org/learn/data-structures/lecture/NYZZP/phone-book-problem)
- [ ] [Phone Book Problem (video)](https://www.coursera.org/lecture/data-structures/phone-book-problem-NYZZP)
- [ ] distributed hash tables:
- [Instant Uploads And Storage Optimization In Dropbox (video)](https://www.coursera.org/learn/data-structures/lecture/DvaIb/instant-uploads-and-storage-optimization-in-dropbox)
- [Distributed Hash Tables (video)](https://www.coursera.org/learn/data-structures/lecture/tvH8H/distributed-hash-tables)
- [Instant Uploads And Storage Optimization In Dropbox (video)](https://www.coursera.org/lecture/data-structures/instant-uploads-and-storage-optimization-in-dropbox-DvaIb)
- [Distributed Hash Tables (video)](https://www.coursera.org/lecture/data-structures/distributed-hash-tables-tvH8H)
- [ ] implement with array using linear probing
- [ ] Implement with array using linear probing
- hash(k, m) - m is size of hash table
- add(key, value) - if key already exists, update value
- exists(key)
@@ -629,7 +632,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- binary search using recursion
- ### Bitwise operations
- [ ] [Bits cheat sheet](https://github.com/jwasham/coding-interview-university/blob/master/extras/cheat%20sheets/bits-cheat-sheet.pdf) - you should know many of the powers of 2 from (2^1 to 2^16 and 2^32)
- [ ] [Bits cheat sheet](https://github.com/jwasham/coding-interview-university/blob/main/extras/cheat%20sheets/bits-cheat-sheet.pdf) - you should know many of the powers of 2 from (2^1 to 2^16 and 2^32)
- [ ] Get a really good understanding of manipulating bits with: &, |, ^, ~, >>, <<
- [ ] [words](https://en.wikipedia.org/wiki/Word_(computer_architecture))
- [ ] Good intro:
@@ -641,24 +644,24 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- [ ] [The Bit Twiddler](https://bits.stephan-brumme.com/)
- [ ] [The Bit Twiddler Interactive](https://bits.stephan-brumme.com/interactive.html)
- [ ] [Bit Hacks (video)](https://www.youtube.com/watch?v=ZusiKXcz_ac)
- [ ] [Practice Operations](https://pconrad.github.io/old_pconrad_cs16/topics/bitOps/)
- [ ] 2s and 1s complement
- [Binary: Plusses & Minuses (Why We Use Two's Complement) (video)](https://www.youtube.com/watch?v=lKTsv6iVxV4)
- [1s Complement](https://en.wikipedia.org/wiki/Ones%27_complement)
- [2s Complement](https://en.wikipedia.org/wiki/Two%27s_complement)
- [ ] count set bits
- [ ] Count set bits
- [4 ways to count bits in a byte (video)](https://youtu.be/Hzuzo9NJrlc)
- [Count Bits](https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan)
- [How To Count The Number Of Set Bits In a 32 Bit Integer](http://stackoverflow.com/questions/109023/how-to-count-the-number-of-set-bits-in-a-32-bit-integer)
- [ ] swap values:
- [ ] Swap values:
- [Swap](https://bits.stephan-brumme.com/swap.html)
- [ ] absolute value:
- [ ] Absolute value:
- [Absolute Integer](https://bits.stephan-brumme.com/absInteger.html)
## Trees
- ### Trees - Notes & Background
- [ ] [Series: Core Trees (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/ovovP/core-trees)
- [ ] [Series: Trees (video)](https://www.coursera.org/learn/data-structures/lecture/95qda/trees)
- [ ] [Series: Trees (video)](https://www.coursera.org/lecture/data-structures/trees-95qda)
- basic tree construction
- traversal
- manipulation algorithms
@@ -677,9 +680,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- preorder (DFS: self, left, right)
- ### Binary search trees: BSTs
- [ ] [Binary Search Tree Review (video)](https://www.youtube.com/watch?v=x6At0nzX92o&index=1&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
- [ ] [Series (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/p82sw/core-introduction-to-binary-search-trees)
- starts with symbol table and goes through BST applications
- [ ] [Binary Search Tree Review (video)](https://www.youtube.com/watch?v=x6At0nzX92o&index=1&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
- [ ] [Introduction (video)](https://www.coursera.org/learn/data-structures/lecture/E7cXP/introduction)
- [ ] [MIT (video)](https://www.youtube.com/watch?v=9Jry5-82I68)
- C/C++:
@@ -732,15 +733,14 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- [ ] sift_down - needed for extract_max
- [ ] remove(i) - removes item at index x
- [ ] heapify - create a heap from an array of elements, needed for heap_sort
- [ ] heap_sort() - take an unsorted array and turn it into a sorted array in-place using a max heap
- note: using a min heap instead would save operations, but double the space needed (cannot do in-place).
- [ ] heap_sort() - take an unsorted array and turn it into a sorted array in-place using a max heap or min heap
## Sorting
- [ ] Notes:
- Implement sorts & know best case/worst case, average complexity of each:
- no bubble sort - it's terrible - O(n^2), except when n <= 16
- [ ] stability in sorting algorithms ("Is Quicksort stable?")
- [ ] Stability in sorting algorithms ("Is Quicksort stable?")
- [Sorting Algorithm Stability](https://en.wikipedia.org/wiki/Sorting_algorithm#Stability)
- [Stability In Sorting Algorithms](http://stackoverflow.com/questions/1517793/stability-in-sorting-algorithms)
- [Stability In Sorting Algorithms](http://www.geeksforgeeks.org/stability-in-sorting-algorithms/)
@@ -749,7 +749,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- I wouldn't recommend sorting a linked list, but merge sort is doable.
- [Merge Sort For Linked List](http://www.geeksforgeeks.org/merge-sort-for-linked-list/)
- For heapsort, see Heap data structure above. Heap sort is great, but not stable.
- For heapsort, see Heap data structure above. Heap sort is great, but not stable
- [ ] [Sedgewick - Mergesort (5 videos)](https://www.coursera.org/learn/algorithms-part1/home/week/3)
- [ ] [1. Mergesort](https://www.coursera.org/learn/algorithms-part1/lecture/ARWDq/mergesort)
@@ -791,7 +791,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
- [ ] Mergesort: O(n log n) average and worst case
- [ ] Quicksort O(n log n) average case
- Selection sort and insertion sort are both O(n^2) average and worst case
- For heapsort, see Heap data structure above.
- For heapsort, see Heap data structure above
- [ ] Not required, but I recommended them:
- [ ] [Sedgewick - Radix Sorts (6 videos)](https://www.coursera.org/learn/algorithms-part2/home/week/3)
@@ -821,8 +821,8 @@ Graphs can be used to represent many problems in computer science, so this secti
- adjacency list
- adjacency map
- Familiarize yourself with each representation and its pros & cons
- BFS and DFS - know their computational complexity, their tradeoffs, and how to implement them in real code
- When asked a question, look for a graph-based solution first, then move on if none.
- BFS and DFS - know their computational complexity, their trade offs, and how to implement them in real code
- When asked a question, look for a graph-based solution first, then move on if none
- [ ] MIT(videos):
- [ ] [Breadth-First Search](https://www.youtube.com/watch?v=s-CYnVz-uh4&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=13)
@@ -878,8 +878,8 @@ Graphs can be used to represent many problems in computer science, so this secti
- [ ] [Lecture 9 | Programming Abstractions (video)](https://www.youtube.com/watch?v=uFJhEPrbycQ&list=PLFE6E58F856038C69&index=9)
- [ ] [Lecture 10 | Programming Abstractions (video)](https://www.youtube.com/watch?v=NdF1QDTRkck&index=10&list=PLFE6E58F856038C69)
- [ ] [Lecture 11 | Programming Abstractions (video)](https://www.youtube.com/watch?v=p-gpaIGRCQI&list=PLFE6E58F856038C69&index=11)
- when it is appropriate to use it
- how is tail recursion better than not?
- When it is appropriate to use it?
- How is tail recursion better than not?
- [ ] [What Is Tail Recursion Why Is It So Bad?](https://www.quora.com/What-is-tail-recursion-Why-is-it-so-bad)
- [ ] [Tail Recursion (video)](https://www.youtube.com/watch?v=L1jjXGfxozc)
@@ -990,16 +990,16 @@ Graphs can be used to represent many problems in computer science, so this secti
- [What Is The Difference Between A Process And A Thread?](https://www.quora.com/What-is-the-difference-between-a-process-and-a-thread)
- Covers:
- Processes, Threads, Concurrency issues
- difference between processes and threads
- processes
- threads
- locks
- mutexes
- semaphores
- monitors
- how they work
- deadlock
- livelock
- Difference between processes and threads
- Processes
- Threads
- Locks
- Mutexes
- Semaphores
- Monitors
- How they work?
- Deadlock
- Livelock
- CPU activity, interrupts, context switching
- Modern concurrency constructs with multicore processors
- [Paging, segmentation and virtual memory (video)](https://www.youtube.com/watch?v=LKe7xK0bF7o&list=PLCiOXwirraUCBE9i_ukL8_Kfg6XNv7Se8&index=2)
@@ -1008,7 +1008,7 @@ Graphs can be used to represent many problems in computer science, so this secti
- Thread resource needs (shares above (minus stack) with other threads in the same process but each has its own pc, stack counter, registers, and stack)
- Forking is really copy on write (read-only) until the new process writes to memory, then it does a full copy.
- Context switching
- How context switching is initiated by the operating system and underlying hardware
- How context switching is initiated by the operating system and underlying hardware?
- [ ] [threads in C++ (series - 10 videos)](https://www.youtube.com/playlist?list=PL5jc9xFGsL8E12so1wlMS0r0hTQoJL74M)
- [ ] concurrency in Python (videos):
- [ ] [Short series on threads](https://www.youtube.com/playlist?list=PL1H1sBF1VAKVMONJWJkmUh6_p8g4F2oy1)
@@ -1035,8 +1035,8 @@ Graphs can be used to represent many problems in computer science, so this secti
- [ ] [How to write tests](http://jasonpolites.github.io/tao-of-testing/ch4-1.1.html)
- ### Scheduling
- in an OS, how it works
- can be gleaned from Operating System videos
- In an OS, how it works?
- Can be gleaned from Operating System videos
- ### String searching & manipulations
- [ ] [Sedgewick - Suffix Arrays (video)](https://www.coursera.org/learn/algorithms-part2/lecture/TH18W/suffix-arrays)
@@ -1048,12 +1048,12 @@ Graphs can be used to represent many problems in computer science, so this secti
- [ ] [5. Rabin-Karp](https://www.coursera.org/learn/algorithms-part2/lecture/3KiqT/rabin-karp)
- [ ] [Search pattern in text (video)](https://www.coursera.org/learn/data-structures/lecture/tAfHI/search-pattern-in-text)
If you need more detail on this subject, see "String Matching" section in [Additional Detail on Some Subjects](#additional-detail-on-some-subjects)
If you need more detail on this subject, see "String Matching" section in [Additional Detail on Some Subjects](#additional-detail-on-some-subjects).
- ### Tries
- Note there are different kinds of tries. Some have prefixes, some don't, and some use string instead of bits
to track the path.
- I read through code, but will not implement.
to track the path
- I read through code, but will not implement
- [ ] [Sedgewick - Tries (3 videos)](https://www.coursera.org/learn/algorithms-part2/home/week/4)
- [ ] [1. R Way Tries](https://www.coursera.org/learn/algorithms-part2/lecture/CPVdr/r-way-tries)
- [ ] [2. Ternary Search Tries](https://www.coursera.org/learn/algorithms-part2/lecture/yQM8K/ternary-search-tries)
@@ -1085,8 +1085,8 @@ Graphs can be used to represent many problems in computer science, so this secti
- ### Networking
- **if you have networking experience or want to be a reliability engineer or operations engineer, expect questions**
- otherwise, this is just good to know
- [ ] [Khan Academy](https://www.khanacademy.org/computing/computer-science/internet-intro)
- Otherwise, this is just good to know
- [ ] [Khan Academy](https://www.khanacademy.org/computing/computer-science/computers-and-internet-code-org)
- [ ] [UDP and TCP: Comparison of Transport Protocols (video)](https://www.youtube.com/watch?v=Vdc8TCESIg8)
- [ ] [TCP/IP and the OSI Model Explained! (video)](https://www.youtube.com/watch?v=e5DEVa9eSN0)
- [ ] [Packet Transmission across the Internet. Networking & TCP/IP tutorial. (video)](https://www.youtube.com/watch?v=nomyRJehhnM)
@@ -1106,13 +1106,13 @@ Graphs can be used to represent many problems in computer science, so this secti
- Scalability and System Design are very large topics with many topics and resources, since
there is a lot to consider when designing a software/hardware system that can scale.
Expect to spend quite a bit of time on this.
Expect to spend quite a bit of time on this
- Considerations:
- scalability
- Scalability
- Distill large data sets to single values
- Transform one data set to another
- Handling obscenely large amounts of data
- system design
- System design
- features sets
- interfaces
- class hierarchies
@@ -1126,12 +1126,12 @@ Graphs can be used to represent many problems in computer science, so this secti
- [ ] [8 Things You Need to Know Before a System Design Interview](http://blog.gainlo.co/index.php/2015/10/22/8-things-you-need-to-know-before-system-design-interviews/)
- [ ] [Algorithm design](http://www.hiredintech.com/algorithm-design/)
- [ ] [Database Normalization - 1NF, 2NF, 3NF and 4NF (video)](https://www.youtube.com/watch?v=UrYLYV7WSHM)
- [ ] [System Design Interview](https://github.com/checkcheckzz/system-design-interview) - There are a lot of resources in this one. Look through the articles and examples. I put some of them below.
- [ ] [System Design Interview](https://github.com/checkcheckzz/system-design-interview) - There are a lot of resources in this one. Look through the articles and examples. I put some of them below
- [ ] [How to ace a systems design interview](http://www.palantir.com/2011/10/how-to-rock-a-systems-design-interview/)
- [ ] [Numbers Everyone Should Know](http://everythingisdata.wordpress.com/2009/10/17/numbers-everyone-should-know/)
- [ ] [How long does it take to make a context switch?](http://blog.tsunanet.net/2010/11/how-long-does-it-take-to-make-context.html)
- [ ] [Transactions Across Datacenters (video)](https://www.youtube.com/watch?v=srOgpXECblk)
- [ ] [A plain English introduction to CAP Theorem](http://ksat.me/a-plain-english-introduction-to-cap-theorem/)
- [ ] [A plain English introduction to CAP Theorem](http://ksat.me/a-plain-english-introduction-to-cap-theorem)
- [ ] Consensus Algorithms:
- [ ] Paxos - [Paxos Agreement - Computerphile (video)](https://www.youtube.com/watch?v=s8JqcZtvnsM)
- [ ] Raft - [An Introduction to the Raft Distributed Consensus Algorithm (video)](https://www.youtube.com/watch?v=P9Ydif5_qvE)
@@ -1193,32 +1193,32 @@ Graphs can be used to represent many problems in computer science, so this secti
- [ ] Twitter:
- [O'Reilly MySQL CE 2011: Jeremy Cole, "Big and Small Data at @Twitter" (video)](https://www.youtube.com/watch?v=5cKTP36HVgI)
- [Timelines at Scale](https://www.infoq.com/presentations/Twitter-Timeline-Scalability)
- For even more, see "Mining Massive Datasets" video series in the [Video Series](#video-series) section.
- For even more, see "Mining Massive Datasets" video series in the [Video Series](#video-series) section
- [ ] Practicing the system design process: Here are some ideas to try working through on paper, each with some documentation on how it was handled in the real world:
- review: [The System Design Primer](https://github.com/donnemartin/system-design-primer)
- [System Design from HiredInTech](http://www.hiredintech.com/system-design/)
- [cheat sheet](https://github.com/jwasham/coding-interview-university/blob/master/extras/cheat%20sheets/system-design.pdf)
- [cheat sheet](https://github.com/jwasham/coding-interview-university/blob/main/extras/cheat%20sheets/system-design.pdf)
- flow:
1. Understand the problem and scope:
- define the use cases, with interviewer's help
- suggest additional features
- remove items that interviewer deems out of scope
- assume high availability is required, add as a use case
- Define the use cases, with interviewer's help
- Suggest additional features
- Remove items that interviewer deems out of scope
- Assume high availability is required, add as a use case
2. Think about constraints:
- ask how many requests per month
- ask how many requests per second (they may volunteer it or make you do the math)
- estimate reads vs. writes percentage
- keep 80/20 rule in mind when estimating
- how much data written per second
- total storage required over 5 years
- how much data read per second
- Ask how many requests per month
- Ask how many requests per second (they may volunteer it or make you do the math)
- Estimate reads vs. writes percentage
- Keep 80/20 rule in mind when estimating
- How much data written per second
- Total storage required over 5 years
- How much data read per second
3. Abstract design:
- layers (service, data, caching)
- infrastructure: load balancing, messaging
- rough overview of any key algorithm that drives the service
- consider bottlenecks and determine solutions
- Layers (service, data, caching)
- Infrastructure: load balancing, messaging
- Rough overview of any key algorithm that drives the service
- Consider bottlenecks and determine solutions
- Exercises:
- [Design a CDN network: old article](http://repository.cmu.edu/cgi/viewcontent.cgi?article=2112&context=compsci)
- [Design a CDN network: old article](https://kilthub.cmu.edu/articles/Globally_distributed_content_delivery/6605972)
- [Design a random unique ID generation system](https://blog.twitter.com/2010/announcing-snowflake)
- [Design an online multiplayer card game](http://www.indieflashblog.com/how-to-create-an-asynchronous-multiplayer-game.html)
- [Design a key-value database](http://www.slideshare.net/dvirsky/introduction-to-redis)
@@ -1250,12 +1250,12 @@ Now that you know all the computer science topics above, it's time to practice a
**Coding question practice is not about memorizing answers to programming problems.**
Why you need to practice doing programming problems:
- problem recognition, and where the right data structures and algorithms fit in
- gathering requirements for the problem
- talking your way through the problem like you will in the interview
- coding on a whiteboard or paper, not a computer
- coming up with time and space complexity for your solutions
- testing your solutions
- Problem recognition, and where the right data structures and algorithms fit in
- Gathering requirements for the problem
- Talking your way through the problem like you will in the interview
- Coding on a whiteboard or paper, not a computer
- Coming up with time and space complexity for your solutions
- Testing your solutions
There is a great intro for methodical, communicative problem solving in an interview. You'll get this from the programming
interview books, too, but I found this outstanding:
@@ -1263,7 +1263,7 @@ interview books, too, but I found this outstanding:
No whiteboard at home? That makes sense. I'm a weirdo and have a big whiteboard. Instead of a whiteboard, pick up a
large drawing pad from an art store. You can sit on the couch and practice. This is my "sofa whiteboard".
I added the pen in the photo for scale. If you use a pen, you'll wish you could erase. Gets messy quick. I use a pencil
I added the pen in the photo for scale. If you use a pen, you'll wish you could erase. Gets messy quick. I use a pencil
and eraser.
![my sofa whiteboard](https://d3j2pkmjtin6ou.cloudfront.net/art_board_sm_2.jpg)
@@ -1296,16 +1296,16 @@ Take coding challenges every day, as many as you can.
Coding Interview Question Videos:
- [IDeserve (88 videos)](https://www.youtube.com/watch?v=NBcqBddFbZw&list=PLamzFoFxwoNjPfxzaWqs7cZGsPYy0x_gI)
- [Tushar Roy (5 playlists)](https://www.youtube.com/user/tusharroy2525/playlists?shelf_id=2&view=50&sort=dd)
- Super for walkthroughs of problem solutions.
- Super for walkthroughs of problem solutions
- [Nick White - LeetCode Solutions (187 Videos)](https://www.youtube.com/playlist?list=PLU_sdQYzUj2keVENTP0a5rdykRSgg9Wp-)
- Good explanations of solution and the code.
- You can watch several in a short time.
- Good explanations of solution and the code
- You can watch several in a short time
- [FisherCoder - LeetCode Solutions](https://youtube.com/FisherCoder)
Challenge sites:
- [LeetCode](https://leetcode.com/)
- My favorite coding problem site. It's worth the subscription money for the 1-2 months you'll likely be preparing.
- [LeetCode solutions from FisherCoder](https://github.com/fishercoder1534/Leetcode)
- My favorite coding problem site. It's worth the subscription money for the 1-2 months you'll likely be preparing
- [LeetCode solutions from FisherCoder](https://github.com/fishercoder1534/Leetcode)
- See Nick White Videos above for short code-throughs
- [HackerRank](https://www.hackerrank.com/)
- [TopCoder](https://www.topcoder.com/)
@@ -1313,6 +1313,7 @@ Challenge sites:
- [Geeks for Geeks](http://www.geeksforgeeks.org/)
- [InterviewBit](https://www.interviewbit.com/invite/icjf)
- [Project Euler (math-focused)](https://projecteuler.net/index.php?section=problems)
- [Code Exercises](https://code-exercises.com)
Language-learning sites, with challenges:
- [Codewars](http://www.codewars.com)
@@ -1325,9 +1326,10 @@ Challenge repos:
- [Interactive Coding Interview Challenges in Python](https://github.com/donnemartin/interactive-coding-challenges)
Mock Interviews:
- [Gainlo.co: Mock interviewers from big companies](http://www.gainlo.co/) - I used this and it helped me relax for the phone screen and on-site interview.
- [Gainlo.co: Mock interviewers from big companies](http://www.gainlo.co/) - I used this and it helped me relax for the phone screen and on-site interview
- [Pramp: Mock interviews from/with peers](https://www.pramp.com/) - peer-to-peer model of practice interviews
- [Refdash: Mock interviews and expedited interviews](https://refdash.com/) - also help candidates fast track by skipping multiple interviews with tech companies.
- [Refdash: Mock interviews and expedited interviews](https://refdash.com/) - also help candidates fast track by skipping multiple interviews with tech companies
- [interviewing.io: Practice mock interview with senior engineers](https://interviewing.io) - anonymous algorithmic/systems design interviews with senior engineers from FAANG anonymously.
## Once you're closer to the interview
@@ -1350,7 +1352,7 @@ Have a story, not just data, about something you accomplished.
- What's a tough problem you've solved?
- Biggest challenges faced?
- Best/worst designs seen?
- Ideas for improving an existing product.
- Ideas for improving an existing product
- How do you work best, as an individual and as part of a team?
- Which of your skills or experiences would be assets in the role and why?
- What did you most enjoy at [job x / project y]?
@@ -1401,40 +1403,40 @@ You're never really done.
These are here so you can dive into a topic you find interesting.
- [The Unix Programming Environment](https://www.amazon.com/dp/013937681X)
- an oldie but a goodie
- An oldie but a goodie
- [The Linux Command Line: A Complete Introduction](https://www.amazon.com/dp/1593273894/)
- a modern option
- A modern option
- [TCP/IP Illustrated Series](https://en.wikipedia.org/wiki/TCP/IP_Illustrated)
- [Head First Design Patterns](https://www.amazon.com/gp/product/0596007124/)
- a gentle introduction to design patterns
- A gentle introduction to design patterns
- [Design Patterns: Elements of Reusable Object-Oriented Software](https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)
- aka the "Gang Of Four" book, or GOF
- the canonical design patterns book
- AKA the "Gang Of Four" book, or GOF
- The canonical design patterns book
- [UNIX and Linux System Administration Handbook, 5th Edition](https://www.amazon.com/UNIX-Linux-System-Administration-Handbook/dp/0134277554/)
- [Algorithm Design Manual](http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202) (Skiena)
- As a review and problem recognition
- The algorithm catalog portion is well beyond the scope of difficulty you'll get in an interview.
- The algorithm catalog portion is well beyond the scope of difficulty you'll get in an interview
- This book has 2 parts:
- class textbook on data structures and algorithms
- pros:
- is a good review as any algorithms textbook would be
- nice stories from his experiences solving problems in industry and academia
- code examples in C
- cons:
- can be as dense or impenetrable as CLRS, and in some cases, CLRS may be a better alternative for some subjects
- chapters 7, 8, 9 can be painful to try to follow, as some items are not explained well or require more brain than I have
- don't get me wrong: I like Skiena, his teaching style, and mannerisms, but I may not be Stony Brook material.
- algorithm catalog:
- this is the real reason you buy this book.
- about to get to this part. Will update here once I've made my way through it.
- Class textbook on data structures and algorithms
- Pros:
- Is a good review as any algorithms textbook would be
- Nice stories from his experiences solving problems in industry and academia
- Code examples in C
- Cons:
- Can be as dense or impenetrable as CLRS, and in some cases, CLRS may be a better alternative for some subjects
- Chapters 7, 8, 9 can be painful to try to follow, as some items are not explained well or require more brain than I have
- Don't get me wrong: I like Skiena, his teaching style, and mannerisms, but I may not be Stony Brook material
- Algorithm catalog:
- This is the real reason you buy this book
- About to get to this part. Will update here once I've made my way through it
- Can rent it on kindle
- Answers:
- [Solutions](http://www.algorithm.cs.sunysb.edu/algowiki/index.php/The_Algorithms_Design_Manual_(Second_Edition))
- [Solutions](http://blog.panictank.net/category/algorithmndesignmanualsolutions/page/2/)
- [Errata](http://www3.cs.stonybrook.edu/~skiena/algorist/book/errata)
- [Write Great Code: Volume 1: Understanding the Machine](https://www.amazon.com/Write-Great-Code-Understanding-Machine/dp/1593270038)
- The book was published in 2004, and is somewhat outdated, but it's a terrific resource for understanding a computer in brief.
- The author invented [HLA](https://en.wikipedia.org/wiki/High_Level_Assembly), so take mentions and examples in HLA with a grain of salt. Not widely used, but decent examples of what assembly looks like.
- The book was published in 2004, and is somewhat outdated, but it's a terrific resource for understanding a computer in brief
- The author invented [HLA](https://en.wikipedia.org/wiki/High_Level_Assembly), so take mentions and examples in HLA with a grain of salt. Not widely used, but decent examples of what assembly looks like
- These chapters are worth the read to give you a nice foundation:
- Chapter 2 - Numeric Representation
- Chapter 3 - Binary Arithmetic and Bit Operations
@@ -1446,19 +1448,19 @@ You're never really done.
- Chapter 10 - Instruction Set Architecture
- Chapter 11 - Memory Architecture and Organization
- [Introduction to Algorithms](https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844)
- **Important:** Reading this book will only have limited value. This book is a great review of algorithms and data structures, but won't teach you how to write good code. You have to be able to code a decent solution efficiently.
- aka CLR, sometimes CLRS, because Stein was late to the game
- **Important:** Reading this book will only have limited value. This book is a great review of algorithms and data structures, but won't teach you how to write good code. You have to be able to code a decent solution efficiently
- AKA CLR, sometimes CLRS, because Stein was late to the game
- [Computer Architecture, Sixth Edition: A Quantitative Approach](https://www.amazon.com/dp/0128119055)
- For a richer, more up-to-date (2017), but longer treatment
- [Programming Pearls](http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/0201657880)
- The first couple of chapters present clever solutions to programming problems (some very old using data tape) but
that is just an intro. This a guidebook on program design and architecture.
that is just an intro. This a guidebook on program design and architecture
## Additional Learning
I added them to help you become a well-rounded software engineer, and to be aware of certain
I added them to help you become a well-rounded software engineer, and to be aware of certain
technologies and algorithms, so you'll have a bigger toolbox.
- ### Compilers
@@ -1504,11 +1506,11 @@ You're never really done.
- ### Information theory (videos)
- [Khan Academy](https://www.khanacademy.org/computing/computer-science/informationtheory)
- more about Markov processes:
- More about Markov processes:
- [Core Markov Text Generation](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/waxgx/core-markov-text-generation)
- [Core Implementing Markov Text Generation](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/gZhiC/core-implementing-markov-text-generation)
- [Project = Markov Text Generation Walk Through](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/EUjrq/project-markov-text-generation-walk-through)
- See more in MIT 6.050J Information and Entropy series below.
- See more in MIT 6.050J Information and Entropy series below
- ### Parity & Hamming Code (videos)
- [Intro](https://www.youtube.com/watch?v=q-3BctoUpHE)
@@ -1519,19 +1521,19 @@ You're never really done.
- [Error Checking](https://www.youtube.com/watch?v=wbH2VxzmoZk)
- ### Entropy
- also see videos below
- make sure to watch information theory videos first
- Also see videos below
- Make sure to watch information theory videos first
- [Information Theory, Claude Shannon, Entropy, Redundancy, Data Compression & Bits (video)](https://youtu.be/JnJq3Py0dyM?t=176)
- ### Cryptography
- also see videos below
- make sure to watch information theory videos first
- Also see videos below
- Make sure to watch information theory videos first
- [Khan Academy Series](https://www.khanacademy.org/computing/computer-science/cryptography)
- [Cryptography: Hash Functions](https://www.youtube.com/watch?v=KqqOXndnvic&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=30)
- [Cryptography: Encryption](https://www.youtube.com/watch?v=9TNI2wHmaeI&index=31&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp)
- ### Compression
- make sure to watch information theory videos first
- Make sure to watch information theory videos first
- Computerphile (videos):
- [Compression](https://www.youtube.com/watch?v=Lto-ajuqW3w)
- [Entropy in Compression](https://www.youtube.com/watch?v=M5c_RFKVkko)
@@ -1611,8 +1613,8 @@ You're never really done.
- [How To Count A Billion Distinct Objects Using Only 1.5KB Of Memory](http://highscalability.com/blog/2012/4/5/big-data-counting-how-to-count-a-billion-distinct-objects-us.html)
- ### Locality-Sensitive Hashing
- used to determine the similarity of documents
- the opposite of MD5 or SHA which are used to determine if 2 documents/strings are exactly the same.
- Used to determine the similarity of documents
- The opposite of MD5 or SHA which are used to determine if 2 documents/strings are exactly the same
- [Simhashing (hopefully) made simple](http://ferd.ca/simhashing-hopefully-made-simple.html)
- ### van Emde Boas Trees
@@ -1629,11 +1631,11 @@ You're never really done.
to move any accessed key to the root." - Skiena
- Of these, I chose to implement a splay tree. From what I've read, you won't implement a
balanced search tree in your interview. But I wanted exposure to coding one up
and let's face it, splay trees are the bee's knees. I did read a lot of red-black tree code.
- splay tree: insert, search, delete functions
and let's face it, splay trees are the bee's knees. I did read a lot of red-black tree code
- Splay tree: insert, search, delete functions
If you end up implementing red/black tree try just these:
- search and insertion functions, skipping delete
- I want to learn more about B-Tree since it's used so widely with very large data sets.
- Search and insertion functions, skipping delete
- I want to learn more about B-Tree since it's used so widely with very large data sets
- [Self-balancing binary search tree](https://en.wikipedia.org/wiki/Self-balancing_binary_search_tree)
- **AVL trees**
@@ -1642,7 +1644,7 @@ You're never really done.
The AVL tree is another structure supporting O(log n) search, insertion, and removal. It is more rigidly
balanced than redblack trees, leading to slower insertion and removal but faster retrieval. This makes it
attractive for data structures that may be built once and loaded without reconstruction, such as language
dictionaries (or program dictionaries, such as the opcodes of an assembler or interpreter).
dictionaries (or program dictionaries, such as the opcodes of an assembler or interpreter)
- [MIT AVL Trees / AVL Sort (video)](https://www.youtube.com/watch?v=FNeL18KsWPc&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=6)
- [AVL Trees (video)](https://www.coursera.org/learn/data-structures/lecture/Qq5E0/avl-trees)
- [AVL Tree Implementation (video)](https://www.coursera.org/learn/data-structures/lecture/PKEBC/avl-tree-implementation)
@@ -1652,14 +1654,14 @@ You're never really done.
- In practice:
Splay trees are typically used in the implementation of caches, memory allocators, routers, garbage collectors,
data compression, ropes (replacement of string used for long text strings), in Windows NT (in the virtual memory,
networking and file system code) etc.
networking and file system code) etc
- [CS 61B: Splay Trees (video)](https://archive.org/details/ucberkeley_webcast_G5QIXywcJlY)
- MIT Lecture: Splay Trees:
- Gets very mathy, but watch the last 10 minutes for sure.
- [Video](https://www.youtube.com/watch?v=QnPl_Y6EqMo)
- **Red/black trees**
- these are a translation of a 2-3 tree (see below)
- These are a translation of a 2-3 tree (see below).
- In practice:
Redblack trees offer worst-case guarantees for insertion time, deletion time, and search time.
Not only does this make them valuable in time-sensitive applications such as real-time applications,
@@ -1667,7 +1669,7 @@ You're never really done.
for example, many data structures used in computational geometry can be based on redblack trees, and
the Completely Fair Scheduler used in current Linux kernels uses redblack trees. In the version 8 of Java,
the Collection HashMap has been modified such that instead of using a LinkedList to store identical elements with poor
hashcodes, a Red-Black tree is used.
hashcodes, a Red-Black tree is used
- [Aduni - Algorithms - Lecture 4 (link jumps to starting point) (video)](https://youtu.be/1W3x0f_RmUo?list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&t=3871)
- [Aduni - Algorithms - Lecture 5 (video)](https://www.youtube.com/watch?v=hm2GHwyKF1o&list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&index=5)
- [Red-Black Tree](https://en.wikipedia.org/wiki/Red%E2%80%93black_tree)
@@ -1698,12 +1700,12 @@ You're never really done.
- [K-Ary Tree](https://en.wikipedia.org/wiki/K-ary_tree)
- **B-Trees**
- fun fact: it's a mystery, but the B could stand for Boeing, Balanced, or Bayer (co-inventor)
- Fun fact: it's a mystery, but the B could stand for Boeing, Balanced, or Bayer (co-inventor).
- In Practice:
B-Trees are widely used in databases. Most modern filesystems use B-trees (or Variants). In addition to
its use in databases, the B-tree is also used in filesystems to allow quick random access to an arbitrary
block in a particular file. The basic problem is turning the file block i address into a disk block
(or perhaps to a cylinder-head-sector) address.
(or perhaps to a cylinder-head-sector) address
- [B-Tree](https://en.wikipedia.org/wiki/B-tree)
- [B-Tree Datastructure](http://btechsmartclass.com/data_structures/b-trees.html)
- [Introduction to B-Trees (video)](https://www.youtube.com/watch?v=I22wEC1tTGo&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6&index=6)
@@ -1715,8 +1717,8 @@ You're never really done.
- ### k-D Trees
- great for finding number of points in a rectangle or higher dimension object
- a good fit for k-nearest neighbors
- Great for finding number of points in a rectangle or higher dimension object
- A good fit for k-nearest neighbors
- [Kd Trees (video)](https://www.youtube.com/watch?v=W94M9D_yXKk)
- [kNN K-d tree algorithm (video)](https://www.youtube.com/watch?v=Y4ZgLlDfKDg)
@@ -1756,7 +1758,7 @@ You're never really done.
- [Divide & Conquer: Convex Hull, Median Finding](https://www.youtube.com/watch?v=EzeYI7p9MjU&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=2)
- ### Discrete math
- see videos below
- See videos below
- ### Machine Learning
- Why ML?
@@ -1942,6 +1944,11 @@ Sit back and enjoy. "Netflix and skill" :P
- [Directory of Online CS Courses](https://github.com/open-source-society/computer-science)
- [Directory of CS Courses (many with online lectures)](https://github.com/prakhar1989/awesome-courses)
## Algorithms implementation
- [Multiple Algorithms implementation by Princeton University)](https://algs4.cs.princeton.edu/code)
## Papers
- [Love classic papers?](https://www.cs.cmu.edu/~crary/819-f09/)