|
@@ -7,7 +7,7 @@
|
|
>
|
|
>
|
|
> I studied about 8-12 hours a day, for several months. This is my story: [Why I studied full-time for 8 months for a Google interview](https://medium.freecodecamp.org/why-i-studied-full-time-for-8-months-for-a-google-interview-cc662ce9bb13)
|
|
> I studied about 8-12 hours a day, for several months. This is my story: [Why I studied full-time for 8 months for a Google interview](https://medium.freecodecamp.org/why-i-studied-full-time-for-8-months-for-a-google-interview-cc662ce9bb13)
|
|
>
|
|
>
|
|
-> **Please Note:** You won't need to study as much as I did. I wasted a lot of time on things I didn't need to know. More info about that is below. I'll help you get there without wasting your precious time.
|
|
|
|
|
|
+> **Please Note:** You won't need to study as much as I did. I wasted a lot of time on things I didn't need to know. More info about that below. I'll help you get there without wasting your precious time.
|
|
>
|
|
>
|
|
> The items listed here will prepare you well for a technical interview at just about any software company,
|
|
> The items listed here will prepare you well for a technical interview at just about any software company,
|
|
> including the giants: Amazon, Facebook, Google, and Microsoft.
|
|
> including the giants: Amazon, Facebook, Google, and Microsoft.
|
|
@@ -228,9 +228,9 @@ software development/engineering roles.
|
|
|
|
|
|
If you want to work as a software engineer for a large company, these are the things you have to know.
|
|
If you want to work as a software engineer for a large company, these are the things you have to know.
|
|
|
|
|
|
-If you missed out on getting a degree in computer science, as I did, this will catch you up and save four years of your life.
|
|
|
|
|
|
+If you missed out on getting a degree in computer science, like I did, this will catch you up and save four years of your life.
|
|
|
|
|
|
-When I started this project, I didn't know a stack from a heap, didn't know Big-O anything, anything about trees, or how to
|
|
|
|
|
|
+When I started this project, I didn't know a stack from a heap, didn't know Big-O anything, or anything about trees, or how to
|
|
traverse a graph. If I had to code a sorting algorithm, I can tell ya it would have been terrible.
|
|
traverse a graph. If I had to code a sorting algorithm, I can tell ya it would have been terrible.
|
|
Every data structure I had ever used was built into the language, and I didn't know how they worked
|
|
Every data structure I had ever used was built into the language, and I didn't know how they worked
|
|
under the hood at all. I never had to manage memory unless a process I was running would give an "out of
|
|
under the hood at all. I never had to manage memory unless a process I was running would give an "out of
|
|
@@ -243,7 +243,7 @@ It's a long plan. It may take you months. If you are familiar with a lot of this
|
|
|
|
|
|
Everything below is an outline, and you should tackle the items in order from top to bottom.
|
|
Everything below is an outline, and you should tackle the items in order from top to bottom.
|
|
|
|
|
|
-I'm using GitHub's special markdown flavor, including task lists to track progress.
|
|
|
|
|
|
+I'm using GitHub's special markdown flavor, including tasks lists to track progress.
|
|
- [More about GitHub-flavored markdown](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown)
|
|
- [More about GitHub-flavored markdown](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown)
|
|
|
|
|
|
### If you don't want to use git
|
|
### If you don't want to use git
|
|
@@ -303,16 +303,16 @@ not just when a specific online course is in session.
|
|
You'll need to choose a programming language for the coding interviews you do,
|
|
You'll need to choose a programming language for the coding interviews you do,
|
|
but you'll also need to find a language that you can use to study computer science concepts.
|
|
but you'll also need to find a language that you can use to study computer science concepts.
|
|
|
|
|
|
-Preferably the language would be the same so that you only need to be proficient in one.
|
|
|
|
|
|
+Preferably the language would be the same, so that you only need to be proficient in one.
|
|
|
|
|
|
### For this Study Plan
|
|
### For this Study Plan
|
|
|
|
|
|
When I did the study plan, I used 2 languages for most of it: C and Python
|
|
When I did the study plan, I used 2 languages for most of it: C and Python
|
|
|
|
|
|
* C: Very low level. Allows you to deal with pointers and memory allocation/deallocation, so you feel the data structures
|
|
* C: Very low level. Allows you to deal with pointers and memory allocation/deallocation, so you feel the data structures
|
|
- and algorithms in your bones. In higher-level languages like Python or Java, these are hidden from you. In day-to-day work, that's terrific,
|
|
|
|
|
|
+ and algorithms in your bones. In higher level languages like Python or Java, these are hidden from you. In day to day work, that's terrific,
|
|
but when you're learning how these low-level data structures are built, it's great to feel close to the metal.
|
|
but when you're learning how these low-level data structures are built, it's great to feel close to the metal.
|
|
- - C is everywhere. You'll see examples in books, lectures, and videos *everywhere* while you're studying.
|
|
|
|
|
|
+ - 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)
|
|
- [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
|
|
- 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.
|
|
you'll quickly get proficient. Understanding C helps you understand how programs and memory work.
|
|
@@ -340,7 +340,7 @@ You can use a language you are comfortable in to do the coding part of the inter
|
|
- Java
|
|
- Java
|
|
- Python
|
|
- Python
|
|
|
|
|
|
-You could also use these but read around first. There may be caveats:
|
|
|
|
|
|
+You could also use these, but read around first. There may be caveats:
|
|
|
|
|
|
- JavaScript
|
|
- JavaScript
|
|
- Ruby
|
|
- Ruby
|
|
@@ -349,7 +349,7 @@ 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/).
|
|
[Pick One Language for the Coding Interview](https://startupnextdoor.com/important-pick-one-language-for-the-coding-interview/).
|
|
This is the original article my post was based on: [Choosing a Programming Language for Interviews](https://web.archive.org/web/20210516054124/http://blog.codingforinterviews.com/best-programming-language-jobs/)
|
|
This is the original article my post was based on: [Choosing a Programming Language for Interviews](https://web.archive.org/web/20210516054124/http://blog.codingforinterviews.com/best-programming-language-jobs/)
|
|
|
|
|
|
-You need to be very comfortable with the language and be knowledgeable.
|
|
|
|
|
|
+You need to be very comfortable in the language and be knowledgeable.
|
|
|
|
|
|
Read more about choices:
|
|
Read more about choices:
|
|
- [Choose the Right Language for Your Coding Interview](http://www.byte-by-byte.com/choose-the-right-language-for-your-coding-interview/)
|
|
- [Choose the Right Language for Your Coding Interview](http://www.byte-by-byte.com/choose-the-right-language-for-your-coding-interview/)
|
|
@@ -429,7 +429,7 @@ Here are some mistakes I made so you'll have a better experience. And you'll sav
|
|
### 1. You Won't Remember it All
|
|
### 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
|
|
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 them. I didn't need all of that knowledge.
|
|
|
|
|
|
+through my notes and making flashcards, so I could review. I didn't need all of that knowledge.
|
|
|
|
|
|
Please, read so you won't make my mistakes:
|
|
Please, read so you won't make my mistakes:
|
|
|
|
|
|
@@ -458,12 +458,12 @@ same card and answer it several times correctly before you really know it. Repet
|
|
your brain.
|
|
your brain.
|
|
|
|
|
|
An alternative to using my flashcard site is [Anki](http://ankisrs.net/), which has been recommended to me numerous times.
|
|
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 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.
|
|
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)).
|
|
|
|
|
|
-Some students have mentioned formatting issues with white space that can be fixed by doing the following: open deck, edit card, click cards, select the "styling" radio button, and add the member "white-space: pre;" to the card class.
|
|
|
|
|
|
+Some students have mentioned formatting issues with white space that can be fixed by doing the following: open deck, edit card, click cards, select the "styling" radio button, add the member "white-space: pre;" to the card class.
|
|
|
|
|
|
### 3. Do Coding Interview Questions While You're Learning
|
|
### 3. Do Coding Interview Questions While You're Learning
|
|
|
|
|
|
@@ -471,7 +471,7 @@ THIS IS VERY IMPORTANT.
|
|
|
|
|
|
Start doing coding interview questions while you're learning data structures and algorithms.
|
|
Start doing coding interview questions while you're learning data structures and algorithms.
|
|
|
|
|
|
-You need to apply what you're learning to solve problems, or you'll forget. I made this mistake.
|
|
|
|
|
|
+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 somewhat comfortable with it, for example, **linked lists**:
|
|
Once you've learned a topic, and feel somewhat comfortable with it, for example, **linked lists**:
|
|
1. Open one of the [coding interview books](#interview-prep-books) (or coding problem websites, listed below)
|
|
1. Open one of the [coding interview books](#interview-prep-books) (or coding problem websites, listed below)
|
|
@@ -482,7 +482,7 @@ Once you've learned a topic, and feel somewhat comfortable with it, for example,
|
|
|
|
|
|
**Keep doing problems while you're learning all this stuff, not after.**
|
|
**Keep doing problems while you're learning all this stuff, not after.**
|
|
|
|
|
|
-You're not being hired for knowledge, but for how you apply the knowledge.
|
|
|
|
|
|
+You're not being hired for knowledge, but how you apply the knowledge.
|
|
|
|
|
|
There are many resources for this, listed below. Keep going.
|
|
There are many resources for this, listed below. Keep going.
|
|
|
|
|
|
@@ -504,7 +504,7 @@ These are prevalent technologies but not part of this study plan:
|
|
This course goes over a lot of subjects. Each will probably take you a few days, or maybe even a week or more. It depends on your schedule.
|
|
This course goes over a lot of subjects. Each will probably take you a few days, or maybe even a week or more. It depends on your schedule.
|
|
|
|
|
|
Each day, take the next subject in the list, watch some videos about that subject, and then write an implementation
|
|
Each day, take the next subject in the list, watch some videos about that subject, and then write an implementation
|
|
-of that data structure or algorithm in the language, you chose for this course.
|
|
|
|
|
|
+of that data structure or algorithm in the language you chose for this course.
|
|
|
|
|
|
You can see my code here:
|
|
You can see my code here:
|
|
- [C](https://github.com/jwasham/practice-c)
|
|
- [C](https://github.com/jwasham/practice-c)
|
|
@@ -527,7 +527,7 @@ Why you need to practice doing programming problems:
|
|
- Coming up with time and space complexity for your solutions (see Big-O below)
|
|
- Coming up with time and space complexity for your solutions (see Big-O below)
|
|
- Testing 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
|
|
|
|
|
|
+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:
|
|
interview books, too, but I found this outstanding:
|
|
[Algorithm design canvas](http://www.hiredintech.com/algorithm-design/)
|
|
[Algorithm design canvas](http://www.hiredintech.com/algorithm-design/)
|
|
|
|
|
|
@@ -535,7 +535,7 @@ Write code on a whiteboard or paper, not a computer. Test with some sample input
|
|
|
|
|
|
If you don't have a whiteboard at home, pick up a large drawing pad from an art store. You can sit on the couch and practice.
|
|
If you don't have a whiteboard at home, 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 just for scale. If you use a pen, you'll wish you could erase.
|
|
This is my "sofa whiteboard". I added the pen in the photo just for scale. If you use a pen, you'll wish you could erase.
|
|
-Gets messy quickly. **I use a pencil and eraser.**
|
|
|
|
|
|
+Gets messy quick. **I use a pencil and eraser.**
|
|
|
|
|
|

|
|

|
|
|
|
|
|
@@ -554,12 +554,12 @@ Coding Interview Question Videos:
|
|
- [Tushar Roy (5 playlists)](https://www.youtube.com/user/tusharroy2525/playlists?shelf_id=2&view=50&sort=dd)
|
|
- [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-)
|
|
- [Nick White - LeetCode Solutions (187 Videos)](https://www.youtube.com/playlist?list=PLU_sdQYzUj2keVENTP0a5rdykRSgg9Wp-)
|
|
- - Good explanations of the solution and the code
|
|
|
|
|
|
+ - Good explanations of solution and the code
|
|
- You can watch several in a short time
|
|
- You can watch several in a short time
|
|
- [FisherCoder - LeetCode Solutions](https://youtube.com/FisherCoder)
|
|
- [FisherCoder - LeetCode Solutions](https://youtube.com/FisherCoder)
|
|
- [Neetcode - BLIND 75 LeetCode Solutions](https://www.youtube.com/watch?v=KLlXCFG5TnA&list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf)
|
|
- [Neetcode - BLIND 75 LeetCode Solutions](https://www.youtube.com/watch?v=KLlXCFG5TnA&list=PLot-Xpze53ldVwtstag2TL4HQhAnC8ATf)
|
|
- - Good explanations of the solution and the python code
|
|
|
|
- - Also check out [excel sheet](https://docs.google.com/spreadsheets/d/1A2PaQKcdwO_lwxz9bAnxXnIQayCouZP6d-ENrBz_NXc/edit#gid=0) for all question list
|
|
|
|
|
|
+ - Good explanations of solution and the python code
|
|
|
|
+ - Also checkout [excel sheet](https://docs.google.com/spreadsheets/d/1A2PaQKcdwO_lwxz9bAnxXnIQayCouZP6d-ENrBz_NXc/edit#gid=0) for all question list
|
|
- [Github links](https://github.com/neetcode-gh/leetcode) for all solutions code
|
|
- [Github links](https://github.com/neetcode-gh/leetcode) for all solutions code
|
|
- [Neetcode 150](https://neetcode.io/)
|
|
- [Neetcode 150](https://neetcode.io/)
|
|
|
|
|
|
@@ -600,7 +600,7 @@ But don't forget to do coding problems from above while you learn!
|
|
|
|
|
|
Well, that's about enough of that.
|
|
Well, that's about enough of that.
|
|
|
|
|
|
-When you go through "Cracking the Coding Interview", there is a chapter on this, and at the end, there is a quiz to see
|
|
|
|
|
|
+When you go through "Cracking the Coding Interview", there is a chapter on this, and at the end there is a quiz to see
|
|
if you can identify the runtime complexity of different algorithms. It's a super review and test.
|
|
if you can identify the runtime complexity of different algorithms. It's a super review and test.
|
|
|
|
|
|
## Data Structures
|
|
## Data Structures
|
|
@@ -615,13 +615,13 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [ ] Practice coding using arrays and pointers, and pointer math to jump to an index instead of using indexing.
|
|
- [ ] 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
|
|
- can allocate int array under the hood, just not use its features
|
|
- - start with 16, or if starting number is greater, use the power of 2 - 16, 32, 64, 128
|
|
|
|
|
|
+ - start with 16, or if starting number is greater, use power of 2 - 16, 32, 64, 128
|
|
- [ ] size() - number of items
|
|
- [ ] size() - number of items
|
|
- [ ] capacity() - number of items it can hold
|
|
- [ ] capacity() - number of items it can hold
|
|
- [ ] is_empty()
|
|
- [ ] is_empty()
|
|
- [ ] at(index) - returns item at given index, blows up if index out of bounds
|
|
- [ ] at(index) - returns item at given index, blows up if index out of bounds
|
|
- [ ] push(item)
|
|
- [ ] push(item)
|
|
- - [ ] insert(index, item) - inserts an item at index, shifts that index's value and trailing elements to the right
|
|
|
|
|
|
+ - [ ] insert(index, item) - inserts item at index, shifts that index's value and trailing elements to the right
|
|
- [ ] prepend(item) - can use insert above at index 0
|
|
- [ ] prepend(item) - can use insert above at index 0
|
|
- [ ] pop() - remove from end, return value
|
|
- [ ] pop() - remove from end, return value
|
|
- [ ] delete(index) - delete item at index, shifting all trailing elements left
|
|
- [ ] delete(index) - delete item at index, shifting all trailing elements left
|
|
@@ -629,9 +629,9 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [ ] find(item) - looks for value and returns first index with that value, -1 if not found
|
|
- [ ] find(item) - looks for value and returns first index with that value, -1 if not found
|
|
- [ ] resize(new_capacity) // private function
|
|
- [ ] resize(new_capacity) // private function
|
|
- when you reach capacity, resize to double the size
|
|
- when you reach capacity, resize to double the size
|
|
- - when popping an item, if the size is 1/4 of capacity, resize to half
|
|
|
|
|
|
+ - when popping an item, if size is 1/4 of capacity, resize to half
|
|
- [ ] Time
|
|
- [ ] Time
|
|
- - O(1) to add/remove at the end (amortized for allocations for more space), index, or update
|
|
|
|
|
|
+ - O(1) to add/remove at end (amortized for allocations for more space), index, or update
|
|
- O(n) to insert/remove elsewhere
|
|
- O(n) to insert/remove elsewhere
|
|
- [ ] Space
|
|
- [ ] Space
|
|
- contiguous in memory, so proximity helps performance
|
|
- contiguous in memory, so proximity helps performance
|
|
@@ -648,7 +648,7 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [Core Linked Lists Vs Arrays (video)](https://www.coursera.org/lecture/data-structures-optimizing-performance/core-linked-lists-vs-arrays-rjBs9)
|
|
- [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)
|
|
- [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)
|
|
- [ ] [Why you should avoid linked lists (video)](https://www.youtube.com/watch?v=YQs6IC-vgmo)
|
|
- - [ ] Gotcha: you need a pointer to pointer knowledge:
|
|
|
|
|
|
+ - [ ] 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)
|
|
(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.
|
|
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)
|
|
- [Pointers to Pointers](https://www.eskimo.com/~scs/cclass/int/sx8.html)
|
|
@@ -662,7 +662,7 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [ ] pop_back() - removes end item and returns its value
|
|
- [ ] pop_back() - removes end item and returns its value
|
|
- [ ] front() - get value of front item
|
|
- [ ] front() - get value of front item
|
|
- [ ] back() - get value of end item
|
|
- [ ] back() - get value of end item
|
|
- - [ ] insert(index, value) - insert value at index, so a current item at that index is pointed to by a new item at index
|
|
|
|
|
|
+ - [ ] insert(index, value) - insert value at index, so current item at that index is pointed to by new item at index
|
|
- [ ] erase(index) - removes node at given index
|
|
- [ ] erase(index) - removes node at given index
|
|
- [ ] value_n_from_end(n) - returns the value of the node at nth position from the end of the list
|
|
- [ ] value_n_from_end(n) - returns the value of the node at nth position from the end of the list
|
|
- [ ] reverse() - reverses the list
|
|
- [ ] reverse() - reverses the list
|
|
@@ -673,12 +673,12 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
|
|
|
|
- ### Stack
|
|
- ### Stack
|
|
- [ ] [Stacks (video)](https://www.coursera.org/lecture/data-structures/stacks-UdKzQ)
|
|
- [ ] [Stacks (video)](https://www.coursera.org/lecture/data-structures/stacks-UdKzQ)
|
|
- - [ ] Will not implement. Implementing with the array is trivial
|
|
|
|
|
|
+ - [ ] Will not implement. Implementing with array is trivial
|
|
|
|
|
|
- ### Queue
|
|
- ### Queue
|
|
- [ ] [Queue (video)](https://www.coursera.org/lecture/data-structures/queues-EShpq)
|
|
- [ ] [Queue (video)](https://www.coursera.org/lecture/data-structures/queues-EShpq)
|
|
- [ ] [Circular buffer/FIFO](https://en.wikipedia.org/wiki/Circular_buffer)
|
|
- [ ] [Circular buffer/FIFO](https://en.wikipedia.org/wiki/Circular_buffer)
|
|
- - [ ] Implement using linked-list, with a tail pointer:
|
|
|
|
|
|
+ - [ ] Implement using linked-list, with tail pointer:
|
|
- enqueue(value) - adds value at position at tail
|
|
- enqueue(value) - adds value at position at tail
|
|
- dequeue() - returns value and removes least recently added element (front)
|
|
- dequeue() - returns value and removes least recently added element (front)
|
|
- empty()
|
|
- empty()
|
|
@@ -688,8 +688,8 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- empty()
|
|
- empty()
|
|
- full()
|
|
- full()
|
|
- [ ] Cost:
|
|
- [ ] Cost:
|
|
- - a bad implementation using a linked list where you enqueue at the head and dequeue at the tail would be O(n)
|
|
|
|
- because you'd need the next to last element, causing a full traversal of each dequeue
|
|
|
|
|
|
+ - a bad implementation using linked list where you enqueue at head and dequeue at tail would be O(n)
|
|
|
|
+ because you'd need the next to last element, causing a full traversal each dequeue
|
|
- enqueue: O(1) (amortized, linked list and array [probing])
|
|
- enqueue: O(1) (amortized, linked list and array [probing])
|
|
- dequeue: O(1) (linked list and array)
|
|
- dequeue: O(1) (linked list and array)
|
|
- empty: O(1) (linked list and array)
|
|
- empty: O(1) (linked list and array)
|
|
@@ -712,8 +712,8 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [Instant Uploads And Storage Optimization In Dropbox (video)](https://www.coursera.org/lecture/data-structures/instant-uploads-and-storage-optimization-in-dropbox-DvaIb)
|
|
- [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)
|
|
- [Distributed Hash Tables (video)](https://www.coursera.org/lecture/data-structures/distributed-hash-tables-tvH8H)
|
|
|
|
|
|
- - [ ] Implement with the array using linear probing
|
|
|
|
- - hash(k, m) - m is the size of the hash table
|
|
|
|
|
|
+ - [ ] Implement with array using linear probing
|
|
|
|
+ - hash(k, m) - m is size of hash table
|
|
- add(key, value) - if key already exists, update value
|
|
- add(key, value) - if key already exists, update value
|
|
- exists(key)
|
|
- exists(key)
|
|
- get(key)
|
|
- get(key)
|
|
@@ -727,7 +727,7 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [ ] [detail](https://www.topcoder.com/thrive/articles/Binary%20Search)
|
|
- [ ] [detail](https://www.topcoder.com/thrive/articles/Binary%20Search)
|
|
- [ ] [blueprint](https://leetcode.com/discuss/general-discussion/786126/python-powerful-ultimate-binary-search-template-solved-many-problems)
|
|
- [ ] [blueprint](https://leetcode.com/discuss/general-discussion/786126/python-powerful-ultimate-binary-search-template-solved-many-problems)
|
|
- [ ] Implement:
|
|
- [ ] Implement:
|
|
- - binary search (on a sorted array of integers)
|
|
|
|
|
|
+ - binary search (on sorted array of integers)
|
|
- binary search using recursion
|
|
- binary search using recursion
|
|
|
|
|
|
- ### Bitwise operations
|
|
- ### Bitwise operations
|
|
@@ -848,11 +848,11 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- I wouldn't recommend sorting a linked list, but merge sort is doable.
|
|
- 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/)
|
|
- [Merge Sort For Linked List](http://www.geeksforgeeks.org/merge-sort-for-linked-list/)
|
|
|
|
|
|
-- For heapsort, see the 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)
|
|
- [ ] [Sedgewick - Mergesort (5 videos)](https://www.coursera.org/learn/algorithms-part1/home/week/3)
|
|
- [ ] [1. Mergesort](https://www.coursera.org/lecture/algorithms-part1/mergesort-ARWDq)
|
|
- [ ] [1. Mergesort](https://www.coursera.org/lecture/algorithms-part1/mergesort-ARWDq)
|
|
- - [ ] [2. Bottom-up Mergesort](https://www.coursera.org/learn/algorithms-part1/lecture/PWNEl/bottom-up-mergesort)
|
|
|
|
|
|
+ - [ ] [2. Bottom up Mergesort](https://www.coursera.org/learn/algorithms-part1/lecture/PWNEl/bottom-up-mergesort)
|
|
- [ ] [3. Sorting Complexity](https://www.coursera.org/lecture/algorithms-part1/sorting-complexity-xAltF)
|
|
- [ ] [3. Sorting Complexity](https://www.coursera.org/lecture/algorithms-part1/sorting-complexity-xAltF)
|
|
- [ ] [4. Comparators](https://www.coursera.org/lecture/algorithms-part1/comparators-9FYhS)
|
|
- [ ] [4. Comparators](https://www.coursera.org/lecture/algorithms-part1/comparators-9FYhS)
|
|
- [ ] [5. Stability](https://www.coursera.org/learn/algorithms-part1/lecture/pvvLZ/stability)
|
|
- [ ] [5. Stability](https://www.coursera.org/learn/algorithms-part1/lecture/pvvLZ/stability)
|
|
@@ -890,7 +890,7 @@ if you can identify the runtime complexity of different algorithms. It's a super
|
|
- [ ] Mergesort: O(n log n) average and worst case
|
|
- [ ] Mergesort: O(n log n) average and worst case
|
|
- [ ] Quicksort O(n log n) average case
|
|
- [ ] Quicksort O(n log n) average case
|
|
- Selection sort and insertion sort are both O(n^2) average and worst case
|
|
- Selection sort and insertion sort are both O(n^2) average and worst case
|
|
- - For heapsort, see the Heap data structure above
|
|
|
|
|
|
+ - For heapsort, see Heap data structure above
|
|
|
|
|
|
- [ ] Not required, but I recommended them:
|
|
- [ ] Not required, but I recommended them:
|
|
- [ ] [Sedgewick - Radix Sorts (6 videos)](https://www.coursera.org/learn/algorithms-part2/home/week/3)
|
|
- [ ] [Sedgewick - Radix Sorts (6 videos)](https://www.coursera.org/learn/algorithms-part2/home/week/3)
|
|
@@ -911,7 +911,7 @@ If you need more detail on this subject, see "Sorting" section in [Additional De
|
|
|
|
|
|
## Graphs
|
|
## Graphs
|
|
|
|
|
|
-Graphs can be used to represent many problems in computer science, so this section is long like trees and sorting were.
|
|
|
|
|
|
+Graphs can be used to represent many problems in computer science, so this section is long, like trees and sorting were.
|
|
|
|
|
|
- Notes:
|
|
- Notes:
|
|
- There are 4 basic ways to represent a graph in memory:
|
|
- There are 4 basic ways to represent a graph in memory:
|
|
@@ -920,7 +920,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- adjacency list
|
|
- adjacency list
|
|
- adjacency map
|
|
- adjacency map
|
|
- Familiarize yourself with each representation and its pros & cons
|
|
- Familiarize yourself with each representation and its pros & cons
|
|
- - BFS and DFS - know their computational complexity, their trade-offs, and how to implement them in real code
|
|
|
|
|
|
+ - 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
|
|
- When asked a question, look for a graph-based solution first, then move on if none
|
|
|
|
|
|
- [ ] MIT(videos):
|
|
- [ ] MIT(videos):
|
|
@@ -962,7 +962,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [ ] single-source shortest path (Dijkstra)
|
|
- [ ] single-source shortest path (Dijkstra)
|
|
- [ ] minimum spanning tree
|
|
- [ ] minimum spanning tree
|
|
- DFS-based algorithms (see Aduni videos above):
|
|
- DFS-based algorithms (see Aduni videos above):
|
|
- - [ ] check for the cycle (needed for topological sort, since we'll check for the cycle before starting)
|
|
|
|
|
|
+ - [ ] check for cycle (needed for topological sort, since we'll check for cycle before starting)
|
|
- [ ] topological sort
|
|
- [ ] topological sort
|
|
- [ ] count connected components in a graph
|
|
- [ ] count connected components in a graph
|
|
- [ ] list strongly connected components
|
|
- [ ] list strongly connected components
|
|
@@ -1043,10 +1043,10 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [ ] Khan Academy:
|
|
- [ ] Khan Academy:
|
|
- Course layout:
|
|
- Course layout:
|
|
- [ ] [Basic Theoretical Probability](https://www.khanacademy.org/math/probability/probability-and-combinatorics-topic)
|
|
- [ ] [Basic Theoretical Probability](https://www.khanacademy.org/math/probability/probability-and-combinatorics-topic)
|
|
- - Just the videos - 41 (each is simple and each is short):
|
|
|
|
|
|
+ - Just the videos - 41 (each are simple and each are short):
|
|
- [ ] [Probability Explained (video)](https://www.youtube.com/watch?v=uzkc-qNVoOk&list=PLC58778F28211FA19)
|
|
- [ ] [Probability Explained (video)](https://www.youtube.com/watch?v=uzkc-qNVoOk&list=PLC58778F28211FA19)
|
|
|
|
|
|
-- ### NP, NP-Complete, and Approximation Algorithms
|
|
|
|
|
|
+- ### NP, NP-Complete and Approximation Algorithms
|
|
- Know about the most famous classes of NP-complete problems, such as traveling salesman and the knapsack problem,
|
|
- Know about the most famous classes of NP-complete problems, such as traveling salesman and the knapsack problem,
|
|
and be able to recognize them when an interviewer asks you them in disguise.
|
|
and be able to recognize them when an interviewer asks you them in disguise.
|
|
- Know what NP-complete means.
|
|
- Know what NP-complete means.
|
|
@@ -1064,7 +1064,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [ ] [Complexity: P, NP, NP-completeness, Reductions (video)](https://www.youtube.com/watch?v=eHZifpgyH_4&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=22)
|
|
- [ ] [Complexity: P, NP, NP-completeness, Reductions (video)](https://www.youtube.com/watch?v=eHZifpgyH_4&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=22)
|
|
- [ ] [Complexity: Approximation Algorithms (video)](https://www.youtube.com/watch?v=MEz1J9wY2iM&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=24)
|
|
- [ ] [Complexity: Approximation Algorithms (video)](https://www.youtube.com/watch?v=MEz1J9wY2iM&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=24)
|
|
- [ ] [Complexity: Fixed-Parameter Algorithms (video)](https://www.youtube.com/watch?v=4q-jmGrmxKs&index=25&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp)
|
|
- [ ] [Complexity: Fixed-Parameter Algorithms (video)](https://www.youtube.com/watch?v=4q-jmGrmxKs&index=25&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp)
|
|
- - Peter Norvig discusses near-optimal solutions to the traveling salesman problem:
|
|
|
|
|
|
+ - Peter Norvig discusses near-optimal solutions to traveling salesman problem:
|
|
- [Jupyter Notebook](http://nbviewer.jupyter.org/url/norvig.com/ipython/TSP.ipynb)
|
|
- [Jupyter Notebook](http://nbviewer.jupyter.org/url/norvig.com/ipython/TSP.ipynb)
|
|
- Pages 1048 - 1140 in CLRS if you have it.
|
|
- Pages 1048 - 1140 in CLRS if you have it.
|
|
|
|
|
|
@@ -1099,7 +1099,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- Mutexes
|
|
- Mutexes
|
|
- Semaphores
|
|
- Semaphores
|
|
- Monitors
|
|
- Monitors
|
|
- - How do they work?
|
|
|
|
|
|
+ - How they work?
|
|
- Deadlock
|
|
- Deadlock
|
|
- Livelock
|
|
- Livelock
|
|
- CPU activity, interrupts, context switching
|
|
- CPU activity, interrupts, context switching
|
|
@@ -1107,8 +1107,8 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [Paging, segmentation and virtual memory (video)](https://youtu.be/O4nwUqQodAg)
|
|
- [Paging, segmentation and virtual memory (video)](https://youtu.be/O4nwUqQodAg)
|
|
- [Interrupts (video)](https://youtu.be/iKlAWIKEyuw)
|
|
- [Interrupts (video)](https://youtu.be/iKlAWIKEyuw)
|
|
- Process resource needs (memory: code, static storage, stack, heap, and also file descriptors, i/o)
|
|
- Process resource needs (memory: code, static storage, stack, heap, and also file descriptors, i/o)
|
|
- - Thread resource needs (shares above (minus stack) with other threads in the same process but each has its pc, stack counter, registers, and stack)
|
|
|
|
- - Forking is copying on write (read-only) until the new process writes to memory, then it does a full copy.
|
|
|
|
|
|
+ - 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
|
|
- 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)
|
|
- [ ] [threads in C++ (series - 10 videos)](https://www.youtube.com/playlist?list=PL5jc9xFGsL8E12so1wlMS0r0hTQoJL74M)
|
|
@@ -1147,12 +1147,12 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [ ] [5. Rabin-Karp](https://www.coursera.org/lecture/algorithms-part2/rabin-karp-3KiqT)
|
|
- [ ] [5. Rabin-Karp](https://www.coursera.org/lecture/algorithms-part2/rabin-karp-3KiqT)
|
|
- [ ] [Search pattern in text (video)](https://www.coursera.org/learn/data-structures/lecture/tAfHI/search-pattern-in-text)
|
|
- [ ] [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 the "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
|
|
- ### Tries
|
|
- Note there are different kinds of tries. Some have prefixes, some don't, and some use string instead of bits
|
|
- Note there are different kinds of tries. Some have prefixes, some don't, and some use string instead of bits
|
|
to track the path
|
|
to track the path
|
|
- - I read through the code, but will not implement
|
|
|
|
|
|
+ - I read through code, but will not implement
|
|
- [ ] [Sedgewick - Tries (3 videos)](https://www.coursera.org/learn/algorithms-part2/home/week/4)
|
|
- [ ] [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)
|
|
- [ ] [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)
|
|
- [ ] [2. Ternary Search Tries](https://www.coursera.org/learn/algorithms-part2/lecture/yQM8K/ternary-search-tries)
|
|
@@ -1164,7 +1164,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [ ] [Implementing A Trie (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/DFvd3/core-implementing-a-trie)
|
|
- [ ] [Implementing A Trie (video)](https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/DFvd3/core-implementing-a-trie)
|
|
- [ ] [The Trie: A Neglected Data Structure](https://www.toptal.com/java/the-trie-a-neglected-data-structure)
|
|
- [ ] [The Trie: A Neglected Data Structure](https://www.toptal.com/java/the-trie-a-neglected-data-structure)
|
|
- [ ] [TopCoder - Using Tries](https://www.topcoder.com/thrive/articles/Using%20Tries)
|
|
- [ ] [TopCoder - Using Tries](https://www.topcoder.com/thrive/articles/Using%20Tries)
|
|
- - [ ] [Stanford Lecture (real-world use case) (video)](https://www.youtube.com/watch?v=TJ8SkcUSdbU)
|
|
|
|
|
|
+ - [ ] [Stanford Lecture (real world use case) (video)](https://www.youtube.com/watch?v=TJ8SkcUSdbU)
|
|
- [ ] [MIT, Advanced Data Structures, Strings (can get pretty obscure about halfway through) (video)](https://www.youtube.com/watch?v=NinWEPPrkDQ&index=16&list=PLUl4u3cNGP61hsJNdULdudlRL493b-XZf)
|
|
- [ ] [MIT, Advanced Data Structures, Strings (can get pretty obscure about halfway through) (video)](https://www.youtube.com/watch?v=NinWEPPrkDQ&index=16&list=PLUl4u3cNGP61hsJNdULdudlRL493b-XZf)
|
|
|
|
|
|
- ### Floating Point Numbers
|
|
- ### Floating Point Numbers
|
|
@@ -1178,7 +1178,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [ ] [Big And Little Endian](https://web.archive.org/web/20180107141940/http://www.cs.umd.edu:80/class/sum2003/cmsc311/Notes/Data/endian.html)
|
|
- [ ] [Big And Little Endian](https://web.archive.org/web/20180107141940/http://www.cs.umd.edu:80/class/sum2003/cmsc311/Notes/Data/endian.html)
|
|
- [ ] [Big Endian Vs Little Endian (video)](https://www.youtube.com/watch?v=JrNF0KRAlyo)
|
|
- [ ] [Big Endian Vs Little Endian (video)](https://www.youtube.com/watch?v=JrNF0KRAlyo)
|
|
- [ ] [Big And Little Endian Inside/Out (video)](https://www.youtube.com/watch?v=oBSuXP-1Tc0)
|
|
- [ ] [Big And Little Endian Inside/Out (video)](https://www.youtube.com/watch?v=oBSuXP-1Tc0)
|
|
- - Very technical talk for kernel devs. Don't worry if most are over your head.
|
|
|
|
|
|
+ - Very technical talk for kernel devs. Don't worry if most is over your head.
|
|
- The first half is enough.
|
|
- The first half is enough.
|
|
|
|
|
|
- ### Networking
|
|
- ### Networking
|
|
@@ -1217,7 +1217,7 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
## Update Your Resume
|
|
## Update Your Resume
|
|
|
|
|
|
- See Resume prep information in the books: "Cracking The Coding Interview" and "Programming Interviews Exposed"
|
|
- See Resume prep information in the books: "Cracking The Coding Interview" and "Programming Interviews Exposed"
|
|
-- I don't know how important this is (you can do your research) but here is an article on making your resume ATS Compliant:
|
|
|
|
|
|
+- I don't know how important this is (you can do your own research) but here is an article on making your resume ATS Compliant:
|
|
- [How to Create or Check if your Resume is ATS Compliant](https://ayedot.com/97/MiniBlog/Meaning-of-ATS-compliant-resume-and-How-to-create-ATS-Resume-for-Free)
|
|
- [How to Create or Check if your Resume is ATS Compliant](https://ayedot.com/97/MiniBlog/Meaning-of-ATS-compliant-resume-and-How-to-create-ATS-Resume-for-Free)
|
|
- ["This Is What A GOOD Resume Should Look Like" by Gayle McDowell (author of Cracking the Coding Interview)](https://www.careercup.com/resume),
|
|
- ["This Is What A GOOD Resume Should Look Like" by Gayle McDowell (author of Cracking the Coding Interview)](https://www.careercup.com/resume),
|
|
- Note by the author: "This is for a US-focused resume. CVs for India and other countries have different expectations, although many of the points will be the same."
|
|
- Note by the author: "This is for a US-focused resume. CVs for India and other countries have different expectations, although many of the points will be the same."
|
|
@@ -1246,13 +1246,13 @@ Graphs can be used to represent many problems in computer science, so this secti
|
|
- [Software Engineer Interview Unleashed (paid course)](https://www.udemy.com/software-engineer-interview-unleashed):
|
|
- [Software Engineer Interview Unleashed (paid course)](https://www.udemy.com/software-engineer-interview-unleashed):
|
|
- Learn how to make yourself ready for software engineer interviews from a former Google interviewer.
|
|
- Learn how to make yourself ready for software engineer interviews from a former Google interviewer.
|
|
- [Python for Data Structures, Algorithms, and Interviews (paid course)](https://www.udemy.com/python-for-data-structures-algorithms-and-interviews/):
|
|
- [Python for Data Structures, Algorithms, and Interviews (paid course)](https://www.udemy.com/python-for-data-structures-algorithms-and-interviews/):
|
|
- - A Python-centric interview prep course that covers data structures, algorithms, mock interviews, and much more.
|
|
|
|
|
|
+ - A Python centric interview prep course which covers data structures, algorithms, mock interviews and much more.
|
|
- [Intro to Data Structures and Algorithms using Python (Udacity free course)](https://www.udacity.com/course/data-structures-and-algorithms-in-python--ud513):
|
|
- [Intro to Data Structures and Algorithms using Python (Udacity free course)](https://www.udacity.com/course/data-structures-and-algorithms-in-python--ud513):
|
|
- - A free Python-centric data structures and algorithms course.
|
|
|
|
|
|
+ - 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):
|
|
- [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.
|
|
- 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):
|
|
- [Grokking the Behavioral Interview (Educative free course)](https://www.educative.io/courses/grokking-the-behavioral-interview):
|
|
- - Many times, it’s not your technical competency that holds you back from landing your dream job, it’s how you perform in the behavioral interview.
|
|
|
|
|
|
+ - Many times, it’s not your technical competency that holds you back from landing your dream job, it’s how you perform on the behavioral interview.
|
|
|
|
|
|
Mock Interviews:
|
|
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
|
|
@@ -1277,7 +1277,7 @@ Have a story, not just data, about something you accomplished.
|
|
- What did you learn at [job x / project y]?
|
|
- What did you learn at [job x / project y]?
|
|
- What would you have done better at [job x / project y]?
|
|
- What would you have done better at [job x / project y]?
|
|
|
|
|
|
-- If you find it hard to come up with good answers to these types of interview questions, here are some ideas:
|
|
|
|
|
|
+- If you find it hard to come up with good answers of these types of interview questions, here are some ideas:
|
|
- [General Interview Questions and their Answers](https://ayedot.com/119/MiniBlog/General-Interview-Questions-and-their-Answers-for-Tech-Jobs)
|
|
- [General Interview Questions and their Answers](https://ayedot.com/119/MiniBlog/General-Interview-Questions-and-their-Answers-for-Tech-Jobs)
|
|
|
|
|
|
## Have questions for the interviewer
|
|
## Have questions for the interviewer
|
|
@@ -1292,7 +1292,7 @@ Some of mine (I already may know the answers, but want their opinion or team per
|
|
- Do you feel your work environment helps you concentrate?
|
|
- Do you feel your work environment helps you concentrate?
|
|
- What are you working on?
|
|
- What are you working on?
|
|
- What do you like about it?
|
|
- What do you like about it?
|
|
-- What is work-life like?
|
|
|
|
|
|
+- What is the work life like?
|
|
- How is the work/life balance?
|
|
- How is the work/life balance?
|
|
|
|
|
|
## Once You've Got The Job
|
|
## Once You've Got The Job
|
|
@@ -1342,7 +1342,7 @@ You're never really done.
|
|
- Code examples in C
|
|
- Code examples in C
|
|
- Cons:
|
|
- Cons:
|
|
- Can be as dense or impenetrable as CLRS, and in some cases, CLRS may be a better alternative for some subjects
|
|
- Can be as dense or impenetrable as CLRS, and in some cases, CLRS may be a better alternative for some subjects
|
|
- - Chapters 7, 8, and 9 can be painful to try to follow, as some items are not explained well or require more brain than I have
|
|
|
|
|
|
+ - 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
|
|
- Don't get me wrong: I like Skiena, his teaching style, and mannerisms, but I may not be Stony Brook material
|
|
- Algorithm catalog:
|
|
- Algorithm catalog:
|
|
- This is the real reason you buy this book.
|
|
- This is the real reason you buy this book.
|
|
@@ -1365,7 +1365,7 @@ You're never really done.
|
|
- Chapter 10 - Instruction Set Architecture
|
|
- Chapter 10 - Instruction Set Architecture
|
|
- Chapter 11 - Memory Architecture and Organization
|
|
- Chapter 11 - Memory Architecture and Organization
|
|
- [Introduction to Algorithms](https://www.amazon.com/Introduction-Algorithms-fourth-Thomas-Cormen/dp/026204630X)
|
|
- [Introduction to Algorithms](https://www.amazon.com/Introduction-Algorithms-fourth-Thomas-Cormen/dp/026204630X)
|
|
- - **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
|
|
|
|
|
|
+ - **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
|
|
- AKA CLR, sometimes CLRS, because Stein was late to the game
|
|
- [Computer Architecture, Sixth Edition: A Quantitative Approach](https://www.amazon.com/dp/0128119055)
|
|
- [Computer Architecture, Sixth Edition: A Quantitative Approach](https://www.amazon.com/dp/0128119055)
|
|
- For a richer, more up-to-date (2017), but longer treatment
|
|
- For a richer, more up-to-date (2017), but longer treatment
|
|
@@ -1457,16 +1457,16 @@ You're never really done.
|
|
- [cheat sheet](https://github.com/jwasham/coding-interview-university/blob/main/extras/cheat%20sheets/system-design.pdf)
|
|
- [cheat sheet](https://github.com/jwasham/coding-interview-university/blob/main/extras/cheat%20sheets/system-design.pdf)
|
|
- flow:
|
|
- flow:
|
|
1. Understand the problem and scope:
|
|
1. Understand the problem and scope:
|
|
- - Define the use cases, with the interviewer's help
|
|
|
|
|
|
+ - Define the use cases, with interviewer's help
|
|
- Suggest additional features
|
|
- Suggest additional features
|
|
- - Remove items that the interviewer deems out of scope
|
|
|
|
|
|
+ - Remove items that interviewer deems out of scope
|
|
- Assume high availability is required, add as a use case
|
|
- Assume high availability is required, add as a use case
|
|
2. Think about constraints:
|
|
2. Think about constraints:
|
|
- Ask how many requests per month
|
|
- Ask how many requests per month
|
|
- Ask how many requests per second (they may volunteer it or make you do the math)
|
|
- Ask how many requests per second (they may volunteer it or make you do the math)
|
|
- Estimate reads vs. writes percentage
|
|
- Estimate reads vs. writes percentage
|
|
- - Keep the 80/20 rule in mind when estimating
|
|
|
|
- - How much data is written per second
|
|
|
|
|
|
+ - Keep 80/20 rule in mind when estimating
|
|
|
|
+ - How much data written per second
|
|
- Total storage required over 5 years
|
|
- Total storage required over 5 years
|
|
- How much data read per second
|
|
- How much data read per second
|
|
3. Abstract design:
|
|
3. Abstract design:
|
|
@@ -1484,7 +1484,7 @@ You're never really done.
|
|
|
|
|
|
## Additional Learning
|
|
## 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.
|
|
technologies and algorithms, so you'll have a bigger toolbox.
|
|
|
|
|
|
- ### Compilers
|
|
- ### Compilers
|
|
@@ -1546,12 +1546,12 @@ You're never really done.
|
|
- [Error Checking](https://www.youtube.com/watch?v=wbH2VxzmoZk)
|
|
- [Error Checking](https://www.youtube.com/watch?v=wbH2VxzmoZk)
|
|
|
|
|
|
- ### Entropy
|
|
- ### Entropy
|
|
- - Also see the videos below
|
|
|
|
|
|
+ - Also see videos below
|
|
- Make sure to watch information theory videos first
|
|
- Make sure to watch information theory videos first
|
|
- [Information Theory, Claude Shannon, Entropy, Redundancy, Data Compression & Bits (video)](https://youtu.be/JnJq3Py0dyM?t=176)
|
|
- [Information Theory, Claude Shannon, Entropy, Redundancy, Data Compression & Bits (video)](https://youtu.be/JnJq3Py0dyM?t=176)
|
|
|
|
|
|
- ### Cryptography
|
|
- ### Cryptography
|
|
- - Also see the videos below
|
|
|
|
|
|
+ - Also see videos below
|
|
- Make sure to watch information theory videos first
|
|
- Make sure to watch information theory videos first
|
|
- [Khan Academy Series](https://www.khanacademy.org/computing/computer-science/cryptography)
|
|
- [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: Hash Functions](https://www.youtube.com/watch?v=KqqOXndnvic&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp&index=30)
|
|
@@ -1627,7 +1627,7 @@ You're never really done.
|
|
- [Understanding The FFT](http://jakevdp.github.io/blog/2013/08/28/understanding-the-fft/)
|
|
- [Understanding The FFT](http://jakevdp.github.io/blog/2013/08/28/understanding-the-fft/)
|
|
|
|
|
|
- ### Bloom Filter
|
|
- ### Bloom Filter
|
|
- - Given a Bloom filter with m bits and k hashing functions, both insertion, and membership testing are O(k)
|
|
|
|
|
|
+ - Given a Bloom filter with m bits and k hashing functions, both insertion and membership testing are O(k)
|
|
- [Bloom Filters (video)](https://www.youtube.com/watch?v=-SuTGoFYjZs)
|
|
- [Bloom Filters (video)](https://www.youtube.com/watch?v=-SuTGoFYjZs)
|
|
- [Bloom Filters | Mining of Massive Datasets | Stanford University (video)](https://www.youtube.com/watch?v=qBTdukbzc78)
|
|
- [Bloom Filters | Mining of Massive Datasets | Stanford University (video)](https://www.youtube.com/watch?v=qBTdukbzc78)
|
|
- [Tutorial](http://billmill.org/bloomfilter-tutorial/)
|
|
- [Tutorial](http://billmill.org/bloomfilter-tutorial/)
|
|
@@ -1638,7 +1638,7 @@ You're never really done.
|
|
|
|
|
|
- ### Locality-Sensitive Hashing
|
|
- ### Locality-Sensitive Hashing
|
|
- Used to determine the similarity of documents
|
|
- Used to determine the similarity of documents
|
|
- - The opposite of MD5 or SHA which are used to determine if 2 documents/strings are the same
|
|
|
|
|
|
+ - 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)
|
|
- [Simhashing (hopefully) made simple](http://ferd.ca/simhashing-hopefully-made-simple.html)
|
|
|
|
|
|
- ### van Emde Boas Trees
|
|
- ### van Emde Boas Trees
|
|
@@ -1666,7 +1666,7 @@ You're never really done.
|
|
- In practice:
|
|
- In practice:
|
|
From what I can tell, these aren't used much in practice, but I could see where they would be:
|
|
From what I can tell, these aren't used much in practice, but I could see where they would be:
|
|
The AVL tree is another structure supporting O(log n) search, insertion, and removal. It is more rigidly
|
|
The AVL tree is another structure supporting O(log n) search, insertion, and removal. It is more rigidly
|
|
- balanced than red-black trees, leading to slower insertion and removal but faster retrieval. This makes it
|
|
|
|
|
|
+ balanced than red–black 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
|
|
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)
|
|
- [MIT AVL Trees / AVL Sort (video)](https://www.youtube.com/watch?v=FNeL18KsWPc&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=6)
|
|
@@ -1690,8 +1690,8 @@ You're never really done.
|
|
Red–black trees offer worst-case guarantees for insertion time, deletion time, and search time.
|
|
Red–black 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,
|
|
Not only does this make them valuable in time-sensitive applications such as real-time applications,
|
|
but it makes them valuable building blocks in other data structures which provide worst-case guarantees;
|
|
but it makes them valuable building blocks in other data structures which provide worst-case guarantees;
|
|
- for example, many data structures used in computational geometry can be based on red-black trees, and
|
|
|
|
- the Completely Fair Scheduler used in current Linux kernels uses red-black trees. In version 8 of Java,
|
|
|
|
|
|
+ for example, many data structures used in computational geometry can be based on red–black trees, and
|
|
|
|
+ the Completely Fair Scheduler used in current Linux kernels uses red–black 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
|
|
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 4 (link jumps to starting point) (video)](https://youtu.be/1W3x0f_RmUo?list=PLFDnELG9dpVxQCxuD-9BSy2E7BWY3t5Sm&t=3871)
|
|
@@ -1702,24 +1702,24 @@ You're never really done.
|
|
- **2-3 search trees**
|
|
- **2-3 search trees**
|
|
- In practice:
|
|
- In practice:
|
|
2-3 trees have faster inserts at the expense of slower searches (since height is more compared to AVL trees).
|
|
2-3 trees have faster inserts at the expense of slower searches (since height is more compared to AVL trees).
|
|
- - You would use 2-3 trees very rarely because its implementation involves different types of nodes. Instead, people use Red-Black trees.
|
|
|
|
|
|
+ - You would use 2-3 tree very rarely because its implementation involves different types of nodes. Instead, people use Red Black trees.
|
|
- [23-Tree Intuition and Definition (video)](https://www.youtube.com/watch?v=C3SsdUqasD4&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6&index=2)
|
|
- [23-Tree Intuition and Definition (video)](https://www.youtube.com/watch?v=C3SsdUqasD4&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6&index=2)
|
|
- [Binary View of 23-Tree](https://www.youtube.com/watch?v=iYvBtGKsqSg&index=3&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
- [Binary View of 23-Tree](https://www.youtube.com/watch?v=iYvBtGKsqSg&index=3&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
- [2-3 Trees (student recitation) (video)](https://www.youtube.com/watch?v=TOb1tuEZ2X4&index=5&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp)
|
|
- [2-3 Trees (student recitation) (video)](https://www.youtube.com/watch?v=TOb1tuEZ2X4&index=5&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp)
|
|
|
|
|
|
- **2-3-4 Trees (aka 2-4 trees)**
|
|
- **2-3-4 Trees (aka 2-4 trees)**
|
|
- In practice:
|
|
- In practice:
|
|
- For every 2-4 trees, there are corresponding red-black trees with data elements in the same order. The insertion and deletion
|
|
|
|
- operations on 2-4 trees are also equivalent to color-flipping and rotations in red-black trees. This makes 2-4 trees an
|
|
|
|
- important tool for understanding the logic behind red-black trees, and this is why many introductory algorithm texts introduce
|
|
|
|
- 2-4 trees just before red-black trees, even though **2-4 trees are not often used in practice**.
|
|
|
|
|
|
+ For every 2-4 tree, there are corresponding red–black trees with data elements in the same order. The insertion and deletion
|
|
|
|
+ operations on 2-4 trees are also equivalent to color-flipping and rotations in red–black trees. This makes 2-4 trees an
|
|
|
|
+ important tool for understanding the logic behind red–black trees, and this is why many introductory algorithm texts introduce
|
|
|
|
+ 2-4 trees just before red–black trees, even though **2-4 trees are not often used in practice**.
|
|
- [CS 61B Lecture 26: Balanced Search Trees (video)](https://archive.org/details/ucberkeley_webcast_zqrqYXkth6Q)
|
|
- [CS 61B Lecture 26: Balanced Search Trees (video)](https://archive.org/details/ucberkeley_webcast_zqrqYXkth6Q)
|
|
- [Bottom Up 234-Trees (video)](https://www.youtube.com/watch?v=DQdMYevEyE4&index=4&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
- [Bottom Up 234-Trees (video)](https://www.youtube.com/watch?v=DQdMYevEyE4&index=4&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
- [Top Down 234-Trees (video)](https://www.youtube.com/watch?v=2679VQ26Fp4&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6&index=5)
|
|
- [Top Down 234-Trees (video)](https://www.youtube.com/watch?v=2679VQ26Fp4&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6&index=5)
|
|
|
|
|
|
- **N-ary (K-ary, M-ary) trees**
|
|
- **N-ary (K-ary, M-ary) trees**
|
|
- note: the N or K is the branching factor (max branches)
|
|
- note: the N or K is the branching factor (max branches)
|
|
- - binary trees are 2-ary trees, with branching factor = 2
|
|
|
|
|
|
+ - binary trees are a 2-ary tree, with branching factor = 2
|
|
- 2-3 trees are 3-ary
|
|
- 2-3 trees are 3-ary
|
|
- [K-Ary Tree](https://en.wikipedia.org/wiki/K-ary_tree)
|
|
- [K-Ary Tree](https://en.wikipedia.org/wiki/K-ary_tree)
|
|
|
|
|
|
@@ -1737,11 +1737,11 @@ You're never really done.
|
|
- [B-Tree Deletion (video)](https://www.youtube.com/watch?v=svfnVhJOfMc&index=8&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
- [B-Tree Deletion (video)](https://www.youtube.com/watch?v=svfnVhJOfMc&index=8&list=PLA5Lqm4uh9Bbq-E0ZnqTIa8LRaL77ica6)
|
|
- [MIT 6.851 - Memory Hierarchy Models (video)](https://www.youtube.com/watch?v=V3omVLzI0WE&index=7&list=PLUl4u3cNGP61hsJNdULdudlRL493b-XZf)
|
|
- [MIT 6.851 - Memory Hierarchy Models (video)](https://www.youtube.com/watch?v=V3omVLzI0WE&index=7&list=PLUl4u3cNGP61hsJNdULdudlRL493b-XZf)
|
|
- covers cache-oblivious B-Trees, very interesting data structures
|
|
- covers cache-oblivious B-Trees, very interesting data structures
|
|
- - the first 37 minutes are very technical and may be skipped (B is block size, cache line size)
|
|
|
|
|
|
+ - the first 37 minutes are very technical, may be skipped (B is block size, cache line size)
|
|
|
|
|
|
|
|
|
|
- ### k-D Trees
|
|
- ### k-D Trees
|
|
- - Great for finding a number of points in a rectangle or higher dimension object
|
|
|
|
|
|
+ - Great for finding number of points in a rectangle or higher dimension object
|
|
- A good fit for k-nearest neighbors
|
|
- A good fit for k-nearest neighbors
|
|
- [kNN K-d tree algorithm (video)](https://www.youtube.com/watch?v=Y4ZgLlDfKDg)
|
|
- [kNN K-d tree algorithm (video)](https://www.youtube.com/watch?v=Y4ZgLlDfKDg)
|
|
|
|
|
|
@@ -1789,7 +1789,7 @@ You're never really done.
|
|
|
|
|
|
## Additional Detail on Some Subjects
|
|
## Additional Detail on Some Subjects
|
|
|
|
|
|
- I added these to reinforce some ideas already presented above but didn't want to include them
|
|
|
|
|
|
+ I added these to reinforce some ideas already presented above, but didn't want to include them
|
|
above because it's just too much. It's easy to overdo it on a subject.
|
|
above because it's just too much. It's easy to overdo it on a subject.
|
|
You want to get hired in this century, right?
|
|
You want to get hired in this century, right?
|
|
|
|
|
|
@@ -1949,7 +1949,7 @@ Sit back and enjoy.
|
|
- [2006: The Chubby Lock Service for Loosely-Coupled Distributed Systems](https://research.google.com/archive/chubby-osdi06.pdf)
|
|
- [2006: The Chubby Lock Service for Loosely-Coupled Distributed Systems](https://research.google.com/archive/chubby-osdi06.pdf)
|
|
- [2007: Dynamo: Amazon’s Highly Available Key-value Store](http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf)
|
|
- [2007: Dynamo: Amazon’s Highly Available Key-value Store](http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf)
|
|
- The Dynamo paper kicked off the NoSQL revolution
|
|
- The Dynamo paper kicked off the NoSQL revolution
|
|
-- [2007: What Every Programmer Should Know About Memory (very long, and the author encourages skipping some sections)](https://www.akkadia.org/drepper/cpumemory.pdf)
|
|
|
|
|
|
+- [2007: What Every Programmer Should Know About Memory (very long, and the author encourages skipping of some sections)](https://www.akkadia.org/drepper/cpumemory.pdf)
|
|
- 2012: AddressSanitizer: A Fast Address Sanity Checker:
|
|
- 2012: AddressSanitizer: A Fast Address Sanity Checker:
|
|
- [paper](http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/37752.pdf)
|
|
- [paper](http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/37752.pdf)
|
|
- [video](https://www.usenix.org/conference/atc12/technical-sessions/presentation/serebryany)
|
|
- [video](https://www.usenix.org/conference/atc12/technical-sessions/presentation/serebryany)
|