plan.txt 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. ##########################################################################################
  2. ## How to read this
  3. ##########################################################################################
  4. Everything below is an outline, and you should tackle the items in order from top to bottom.
  5. I put an asterisk/star (*) at the beginning of a line when I'm done with it. When all sub-items are done,
  6. I put a * at the top level, meaning the entire block is done. Sorry you have to remove all my *
  7. to use this the same way. If you search/replace, there are a couple of places to look out for.
  8. Sometimes I just put a * at top level if I know I've done all the subtasks, to cut down on * clutter.
  9. ##########################################################################################
  10. ## Interview Prep:
  11. ##########################################################################################
  12. * - Videos:
  13. * - https://www.youtube.com/watch?v=oWbUtlUhwa8&feature=youtu.be
  14. * - https://www.youtube.com/watch?v=qc1owf2-220&feature=youtu.be
  15. * - https://www.youtube.com/watch?v=8npJLXkcmu8
  16. * - Articles:
  17. * - http://www.google.com/about/careers/lifeatgoogle/hiringprocess/
  18. * - http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html
  19. - all the things he mentions that you need to know are listed below
  20. * - (very dated) http://dondodge.typepad.com/the_next_big_thing/2010/09/how-to-get-a-job-at-google-interview-questions-hiring-process.html
  21. * - http://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions
  22. * - Additional (not suggested by Google but I added):
  23. * - https://medium.com/always-be-coding/abc-always-be-coding-d5f8051afce2#.4heg8zvm4
  24. * - https://medium.com/always-be-coding/four-steps-to-google-without-a-degree-8f381aa6bd5e#.asalo1vfx
  25. * - https://medium.com/@dpup/whiteboarding-4df873dbba2e#.hf6jn45g1
  26. * - http://www.kpcb.com/blog/lessons-learned-how-google-thinks-about-hiring-management-and-culture
  27. * - http://www.coderust.com/blog/2014/04/10/effective-whiteboarding-during-programming-interviews/
  28. * - Cracking The Coding Interview Set 1:
  29. * - https://www.youtube.com/watch?v=rEJzOhC5ZtQ
  30. * - https://www.youtube.com/watch?v=aClxtDcdpsQ
  31. * - How to Get a Job at the Big 4:
  32. * - https://www.youtube.com/watch?v=YJZCUhxNCv8
  33. * - http://alexbowe.com/failing-at-google-interviews/
  34. ##########################################################################################
  35. ## Knowledge:
  36. ##########################################################################################
  37. This short section were prerequisites/interesting info I wanted to learn before getting started on the daily plan.
  38. You need to know C, C++, or Java to do the coding part of the interview.
  39. They will sometimes make an exception and let you use Python or some other language, but the language
  40. must be mainstream and allow you write your code low-level enough to solve the problems.
  41. You'll see some C, C++ learning included below.
  42. There are a few books involved, see the bottom.
  43. Some videos are available only by enrolling in a Coursera or EdX class. It is free to do so.
  44. * - how computers process a program:
  45. * - https://www.youtube.com/watch?v=42KTvGYQYnA
  46. * - https://www.youtube.com/watch?v=Mv2XQgpbTNE
  47. * - how floating point numbers are stored:
  48. * - simple 8-bit: http://math.stackexchange.com/questions/301435/fractions-in-binary
  49. * - 32 bit: https://www.youtube.com/watch?v=ji3SfClm8TU
  50. * - 64 bit: https://www.youtube.com/watch?v=50ZYcZebIec
  51. * - Computer Arch Intro:
  52. (first video only - interesting but not required) https://www.youtube.com/watch?v=zLP_X4wyHbY&list=PL5PHm2jkkXmi5CxxI7b3JCL1TWybTDtKq&index=1
  53. * - C
  54. * - K&R C book (ANSI C)
  55. * - Clang: https://www.youtube.com/watch?v=U3zCxnj2w8M
  56. * - GDB:
  57. - https://www.youtube.com/watch?v=USPvePv1uzE
  58. - https://www.youtube.com/watch?v=y5JmQItfFck
  59. - Valgrind: https://www.youtube.com/watch?v=fvTsFjDuag8
  60. * - C++
  61. * - basics
  62. * - pointers
  63. * - functions
  64. * - references
  65. * - templates
  66. * - compilation
  67. * - scope & linkage
  68. * - namespaces
  69. * - OOP
  70. * - STL
  71. * - functors: http://www.cprogramming.com/tutorial/functors-function-objects-in-c++.html
  72. * - C++ at Google: https://www.youtube.com/watch?v=NOCElcMcFik
  73. * - Google C++ Style Guide: https://google.github.io/styleguide/cppguide.html
  74. * - Google uses clang-format (there is a command line "style" argument: -style=google)
  75. * - Efficiency with Algorithms, Performance with Data Structures: https://youtu.be/fHNmRkzxHWs
  76. * - review of C++ concepts: https://www.youtube.com/watch?v=Rub-JsjMhWY
  77. - Python
  78. I've already read quite a bit. This is just for review.
  79. - https://www.youtube.com/watch?v=N4mEzFDjqtA
  80. * - compilers:
  81. * - https://class.coursera.org/compilers-004/lecture/1
  82. * - https://class.coursera.org/compilers-004/lecture/2
  83. * - C++: https://www.youtube.com/watch?v=twodd1KFfGk
  84. * - Understanding Compiler Optimization (C++): https://www.youtube.com/watch?v=FnGCDLhaxKU
  85. ----------------------------------------------------------------
  86. The Daily Plan:
  87. Each subject does not require a whole day to be able to understand it fully, and you can do multiple of these in a day.
  88. Each day I take one subject from the list below, watch videos about that subject, and write an implementation in:
  89. C - using structs and functions that take a struct * and something else as args.
  90. C++ - without using built-in types
  91. C++ - using built-in types, like STL's std::list for a linked list
  92. Python - using built-in types (to keep practicing Python)
  93. and write tests to ensure I'm doing it right, sometimes just using simple assert() statements
  94. You may do Java or something else, this is just my thing.
  95. Why code in all of these?
  96. 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)
  97. Work within the raw constraints (allocating/freeing memory without help of garbage collection (except Python))
  98. 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)
  99. I may not have time to do all of these for every subject, but I'll try.
  100. You don't need to memorize the guts of every algorithm.
  101. Write code on a whiteboard, not a computer. Test with some sample inputs.
  102. Then test it out on a computer to make sure it's not buggy from syntax.
  103. ----------------------------------------------------------------
  104. * - Before you get started:
  105. The myth of the Genius Programmer: https://www.youtube.com/watch?v=0SARbwvhupQ
  106. Google engineers are smart, but many have an insecurity that they aren't smart enough.
  107. * - Algorithmic complexity / Big O / Asymptotic analysis
  108. - nothing to implement
  109. - Harvard CS50 - Asymptotic Notation: https://www.youtube.com/watch?v=iOq5kSKqeR4
  110. - Big O Notations (general quick tutorial) - https://www.youtube.com/watch?v=V6mKVRU1evU
  111. - Big O Notation (and Omega and Theta) - best mathematical explanation:
  112. - https://www.youtube.com/watch?v=ei-A_wy5Yxw&index=2&list=PL1BaGV1cIH4UhkL8a9bJGG356covJ76qN
  113. - Skiena:
  114. - video: https://www.youtube.com/watch?v=gSyDMtdPNpU&index=2&list=PLOtl7M3yp-DV69F32zdK7YJcNXpTunF2b
  115. - slides: http://www3.cs.stonybrook.edu/~algorith/video-lectures/2007/lecture2.pdf
  116. - A Gentle Introduction to Algorithm Complexity Analysis: http://discrete.gr/complexity/
  117. - Orders of Growth: https://class.coursera.org/algorithmicthink1-004/lecture/59
  118. - Asymptotics: https://class.coursera.org/algorithmicthink1-004/lecture/61
  119. - UC Berkeley Big O: https://youtu.be/VIS4YDpuP98
  120. - UC Berkeley Big Omega: https://youtu.be/ca3e7UVmeUc
  121. - Amortized Analysis: https://www.youtube.com/watch?v=B3SpQZaAZP4&index=10&list=PL1BaGV1cIH4UhkL8a9bJGG356covJ76qN
  122. - Illustrating "Big O": https://class.coursera.org/algorithmicthink1-004/lecture/63
  123. - Cheat sheet: http://bigocheatsheet.com/
  124. -----------------------------------------------------
  125. Trees
  126. -----------------------------------------------------
  127. * - Arrays: (Implement an automatically resizing vector)
  128. * - Description:
  129. - Arrays: https://www.coursera.org/learn/data-structures/lecture/OsBSF/arrays
  130. - Arrays: https://www.lynda.com/Developer-Programming-Foundations-tutorials/Basic-arrays/149042/177104-4.html
  131. - Multi-dim: https://www.lynda.com/Developer-Programming-Foundations-tutorials/Multidimensional-arrays/149042/177105-4.html
  132. - Dynamic Arrays: https://www.coursera.org/learn/data-structures/lecture/EwbnV/dynamic-arrays
  133. - Jagged: https://www.lynda.com/Developer-Programming-Foundations-tutorials/Jagged-arrays/149042/177106-4.html
  134. - Resizing arrays:
  135. - https://class.coursera.org/algs4partI-010/lecture/19
  136. - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Resizable-arrays/149042/177108-4.html
  137. * - Implement a vector (mutable array with automatic resizing):
  138. * - Practice coding using arrays and pointers, and pointer math to jump to an index instead of using indexing.
  139. * - new raw data array with allocated memory
  140. - can allocate int array under the hood, just not use its features
  141. - start with 16, or if starting number is greater, use power of 2 - 16, 32, 64, 128
  142. * - size() - number of items
  143. * - capacity() - number of items it can hold
  144. * - is_empty()
  145. * - at(index) - returns item at given index, blows up if index out of bounds
  146. * - push(item)
  147. * - insert(index, item) - inserts item at index, shifts that index's value and trailing elements to the right
  148. * - prepend(item) - can use insert above at index 0
  149. * - pop() - remove from end, return value
  150. * - delete(index) - delete item at index, shifting all trailing elements left
  151. * - remove(item) - looks for value and removes index holding it (even if in multiple places)
  152. * - find(item) - looks for value and returns first index with that value, -1 if not found
  153. * - resize(new_capacity) // private function
  154. - when you reach capacity, resize to double the size
  155. - when popping an item, if size is 1/4 of capacity, resize to half
  156. * - Time
  157. - O(1) to add/remove at end (amortized for allocations for more space), index, or update
  158. - O(n) to insert/remove elsewhere
  159. * - Space
  160. - contiguous in memory, so proximity helps performance
  161. - space needed = (array capacity, which is >= n) * size of item, but even if 2n, still O(n)
  162. * - Linked Lists
  163. * - Description:
  164. * - https://www.coursera.org/learn/data-structures/lecture/kHhgK/singly-linked-lists
  165. * - Lynda.com:
  166. - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Introduction-lists/149042/177115-4.html
  167. - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Understanding-basic-list-implementations/149042/177116-4.html
  168. - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Using-singly-doubly-linked-lists/149042/177117-4.html
  169. - https://www.lynda.com/Developer-Programming-Foundations-tutorials/List-support-across-languages/149042/177118-4.html
  170. * - C Code: https://www.youtube.com/watch?v=QN6FPiD0Gzo
  171. - not the whole video, just portions about Node struct and memory allocation.
  172. * - Linked List vs Arrays:
  173. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/rjBs9/core-linked-lists-vs-arrays
  174. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/QUaUd/in-the-real-world-lists-vs-arrays
  175. * - why you should avoid linked lists:
  176. - https://www.youtube.com/watch?v=YQs6IC-vgmo
  177. * - Gotcha: you need pointer to pointer knowledge:
  178. (for when you pass a pointer to a function that may change the address where that pointer points)
  179. 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.
  180. - https://www.eskimo.com/~scs/cclass/int/sx8.html
  181. * - implement (I did with tail pointer & without):
  182. * - size() - returns number of data elements in list
  183. * - empty() - bool returns true if empty
  184. * - value_at(index) - returns the value of the nth item (starting at 0 for first)
  185. * - push_front(value) - adds an item to the front of the list
  186. * - pop_front() - remove front item and return its value
  187. * - push_back(value) - adds an item at the end
  188. * - pop_back() - removes end item and returns its value
  189. * - front() - get value of front item
  190. * - back() - get value of end item
  191. * - insert(index, value) - insert value at index, so current item at that index is pointed to by new item at index
  192. * - erase(index) - removes node at given index
  193. * - value_n_from_end(n) - returns the value of the node at nth position from the end of the list
  194. * - reverse() - reverses the list
  195. * - remove_value(value) - removes the first item in the list with this value
  196. * - Doubly-linked List
  197. - Description: https://www.coursera.org/learn/data-structures/lecture/jpGKD/doubly-linked-lists
  198. - No need to implement
  199. * - Stacks
  200. * - https://www.coursera.org/learn/data-structures/lecture/UdKzQ/stacks
  201. * - https://class.coursera.org/algs4partI-010/lecture/18
  202. * - https://class.coursera.org/algs4partI-010/lecture/19
  203. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Using-stacks-last-first-out/149042/177120-4.html
  204. * - Will not implement. Implementing with array is trivial.
  205. * - Queues
  206. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Using-queues-first-first-out/149042/177122-4.html
  207. * - https://class.coursera.org/algs4partI-010/lecture/20
  208. * - https://www.coursera.org/learn/data-structures/lecture/EShpq/queue
  209. * - Circular buffer/FIFO: https://en.wikipedia.org/wiki/Circular_buffer
  210. * - https://class.coursera.org/algs4partI-010/lecture/23
  211. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Priority-queues-deques/149042/177123-4.html
  212. * - Implement using linked-list, with tail pointer:
  213. - enqueue(value) - adds value at position at tail
  214. - dequeue() - returns value and removes least recently added element (front)
  215. - empty()
  216. * - Implement using fixed-sized array:
  217. - enqueue(value) - adds item at end of available storage
  218. - dequeue() - returns value and removes least recently added element
  219. - empty()
  220. - full()
  221. * - Cost:
  222. - a bad implementation using linked list where you enqueue at head and dequeue at tail would be O(n)
  223. because you'd need the next to last element, causing a full traversal each dequeue
  224. enqueue: O(1) (amortized, linked list and array [probing])
  225. dequeue: O(1) (linked list and array)
  226. empty: O(1) (linked list and array)
  227. * - Hash tables
  228. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Understanding-hash-functions/149042/177126-4.html
  229. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Using-hash-tables/149042/177127-4.html
  230. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Supporting-hashing/149042/177128-4.html
  231. * - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Language-support-hash-tables/149042/177129-4.html
  232. * - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/m7UuP/core-hash-tables
  233. * - https://www.youtube.com/watch?v=C4Kc8xzcA68
  234. * - https://class.coursera.org/algs4partI-010/lecture/52
  235. * - https://class.coursera.org/algs4partI-010/lecture/53
  236. * - https://class.coursera.org/algs4partI-010/lecture/55
  237. * - https://class.coursera.org/algs4partI-010/lecture/56
  238. * - https://www.coursera.org/learn/data-structures/home/week/3
  239. * - https://www.coursera.org/learn/data-structures/lecture/NYZZP/phone-book-problem
  240. * - distributed hash tables:
  241. - https://www.coursera.org/learn/data-structures/lecture/DvaIb/instant-uploads-and-storage-optimization-in-dropbox
  242. - https://www.coursera.org/learn/data-structures/lecture/tvH8H/distributed-hash-tables
  243. * - MIT:
  244. https://www.youtube.com/watch?v=0M_kIqhwbFo&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=8
  245. https://www.youtube.com/watch?v=BRO7mVIFt08&index=9&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb
  246. https://www.youtube.com/watch?v=rvdJDijO2Ro&index=10&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb
  247. * - implement with array using linear probing
  248. - hash(k, m) - m is size of hash table
  249. - add(key, value) - if key already exists, update value
  250. - exists(key)
  251. - get(key)
  252. - remove(key)
  253. -----------------------------------------------------
  254. More Knowledge
  255. -----------------------------------------------------
  256. * - Binary search:
  257. * - https://www.youtube.com/watch?v=D5SrAga1pno
  258. * - https://www.khanacademy.org/computing/computer-science/algorithms/binary-search/a/binary-search
  259. * - detail: https://www.topcoder.com/community/data-science/data-science-tutorials/binary-search/
  260. * - Implement:
  261. - binary search (on sorted array of integers)
  262. - binary search using recursion
  263. * - Bit operations
  264. * - Get a really good understanding of manipulating bits with: &, |, ^, ~, >>, <<
  265. * - words: https://en.wikipedia.org/wiki/Word_(computer_architecture)
  266. * - Good intro:
  267. https://www.youtube.com/watch?v=7jkIUgLC29I
  268. * - https://www.youtube.com/watch?v=d0AwjSpNXR0
  269. * - https://en.wikipedia.org/wiki/Bit_manipulation
  270. * - https://en.wikipedia.org/wiki/Bitwise_operation
  271. * - https://graphics.stanford.edu/~seander/bithacks.html
  272. * - http://bits.stephan-brumme.com/
  273. * - http://bits.stephan-brumme.com/interactive.html
  274. * - 2s and 1s complement
  275. - https://www.youtube.com/watch?v=lKTsv6iVxV4
  276. - https://en.wikipedia.org/wiki/Ones%27_complement
  277. - https://en.wikipedia.org/wiki/Two%27s_complement
  278. * - count set bits
  279. - https://youtu.be/Hzuzo9NJrlc
  280. - https://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetKernighan
  281. - http://stackoverflow.com/questions/109023/how-to-count-the-number-of-set-bits-in-a-32-bit-integer
  282. * - round to next power of 2:
  283. - http://bits.stephan-brumme.com/roundUpToNextPowerOfTwo.html
  284. * - swap values:
  285. - http://bits.stephan-brumme.com/swap.html
  286. * - absolute value:
  287. - http://bits.stephan-brumme.com/absInteger.html
  288. * - Parity & Hamming Code:
  289. * - Parity:
  290. - https://www.youtube.com/watch?v=DdMcAUlxh1M
  291. * - Hamming Code:
  292. - Error detection: https://www.youtube.com/watch?v=1A_NcXxdoCc
  293. - Error correction: https://www.youtube.com/watch?v=JAMLuxdHH8o
  294. * - Error Checking:
  295. - https://www.youtube.com/watch?v=wbH2VxzmoZk
  296. -----------------------------------------------------
  297. Trees
  298. -----------------------------------------------------
  299. Notes:
  300. - Series: https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/ovovP/core-trees
  301. - Series: https://www.coursera.org/learn/data-structures/lecture/95qda/trees
  302. - basic tree construction
  303. - traversal
  304. - manipulation algorithms
  305. - BFS (breadth-first search)
  306. - DFS (depth-first search)
  307. - know the difference between these:
  308. - inorder (DFS: left, self, right)
  309. - postorder (DFS: left, right, self)
  310. - preorder (DFS: self, left, right)
  311. - level order (BFS, using queue)
  312. - Binary search trees: BSTs
  313. * - Series: https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/p82sw/core-introduction-to-binary-search-trees
  314. * - Series: https://class.coursera.org/algs4partI-010/lecture/43
  315. - starts with symbol table and goes through BST applications
  316. * - https://www.coursera.org/learn/data-structures/lecture/E7cXP/introduction
  317. - C/C++:
  318. * - https://www.youtube.com/watch?v=COZK7NATh4k&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=28
  319. * - https://www.youtube.com/watch?v=hWokyBoo0aI&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=29
  320. * - https://www.youtube.com/watch?v=Ut90klNN264&index=30&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
  321. - https://www.youtube.com/watch?v=_pnqMz5nrRs&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=31
  322. - https://www.youtube.com/watch?v=9RHO6jU--GU&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=32
  323. - https://www.youtube.com/watch?v=86g8jAQug04&index=33&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
  324. - https://www.youtube.com/watch?v=gm8DUJJhmY4&index=34&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
  325. - https://www.youtube.com/watch?v=yEwSGhSsT0U&index=35&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
  326. - https://www.youtube.com/watch?v=gcULXE7ViZw&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P&index=36
  327. - https://www.youtube.com/watch?v=5cPbNCrdotA&index=37&list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P
  328. Know least one type of balanced binary tree (and know how it's implemented):
  329. - red/black tree
  330. - https://class.coursera.org/algs4partI-010/lecture/50
  331. - splay trees
  332. - https://www.coursera.org/learn/data-structures/lecture/O9nZ6/splay-trees
  333. - AVL trees
  334. - https://www.coursera.org/learn/data-structures/lecture/Qq5E0/avl-trees
  335. - https://www.coursera.org/learn/data-structures/lecture/PKEBC/avl-tree-implementation
  336. - https://www.coursera.org/learn/data-structures/lecture/22BgE/split-and-merge
  337. - B-Trees:
  338. - fun fact: B could stand for Boeing, Balanced, or Bayer (co-inventor)
  339. - https://en.wikipedia.org/wiki/B-tree
  340. - https://class.coursera.org/algs4partI-010/lecture/51
  341. - 2-3 (type of B-tree) Search Trees
  342. - https://class.coursera.org/algs4partI-010/lecture/49
  343. - N-ary trees
  344. - https://en.wikipedia.org/wiki/K-ary_tree
  345. - Tries
  346. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/08Xyf/core-introduction-to-tries
  347. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/PvlZW/core-performance-of-tries
  348. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/DFvd3/core-implementing-a-trie
  349. - Heap (data structure):
  350. - https://en.wikipedia.org/wiki/Heap_(data_structure)
  351. - https://www.coursera.org/learn/data-structures/lecture/2OpTs/introduction
  352. - https://www.coursera.org/learn/data-structures/lecture/z3l9N/naive-implementations
  353. - https://www.coursera.org/learn/data-structures/lecture/GRV2q/binary-trees
  354. - https://www.coursera.org/learn/data-structures/supplement/S5xxz/tree-height-remark
  355. - https://www.coursera.org/learn/data-structures/lecture/0g1dl/basic-operations
  356. - https://www.coursera.org/learn/data-structures/lecture/gl5Ni/complete-binary-trees
  357. - https://www.coursera.org/learn/data-structures/lecture/HxQo9/pseudocode
  358. - see: https://class.coursera.org/algs4partI-010/lecture
  359. - https://class.coursera.org/algs4partI-010/lecture/39
  360. - Binary Heap:
  361. Min Heap / Max Heap
  362. - Disjoint Sets:
  363. - https://www.coursera.org/learn/data-structures/lecture/JssSY/overview
  364. - https://www.coursera.org/learn/data-structures/lecture/EM5D0/naive-implementations
  365. - https://www.coursera.org/learn/data-structures/lecture/Mxu0w/trees
  366. - https://www.coursera.org/learn/data-structures/lecture/qb4c2/union-by-rank
  367. - https://www.coursera.org/learn/data-structures/lecture/Q9CVI/path-compression
  368. - https://www.coursera.org/learn/data-structures/lecture/GQQLN/analysis-optional
  369. - Priority Queue
  370. - https://en.wikipedia.org/wiki/Priority_queue
  371. -----------------------------------------------------
  372. Graphs
  373. -----------------------------------------------------
  374. Notes:
  375. There are three basic ways to represent a graph in memory:
  376. - objects and pointers
  377. - matrix
  378. - adjacency list
  379. Familiarize yourself with each representation and its pros & cons
  380. BFS and DFS - know their computational complexity, their tradeoffs, and how to implement them in real code
  381. If you get a chance, try to study up on fancier algorithms:
  382. - Dijkstra's algorithm
  383. - https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
  384. - A*
  385. - https://en.wikipedia.org/wiki/A*_search_algorithm
  386. When asked a question, look for a graph-based solution first, then move on if none.
  387. Compute Strongly Connected Components
  388. - https://www.coursera.org/learn/algorithms-on-graphs/home/week/5
  389. Implement:
  390. Dijkstra's algorithm
  391. A*
  392. You'll get more graph practice in Skiena's book (see Books section below) and the interview books
  393. -----------------------------------------------------
  394. Sorting
  395. -----------------------------------------------------
  396. Notes:
  397. - Implement & know best case/worst case, average complexity of each:
  398. - no bubble sort - it's terrible - O(n^2)
  399. - stability in sorting algorithms:
  400. - http://stackoverflow.com/questions/1517793/stability-in-sorting-algorithms
  401. - http://www.geeksforgeeks.org/stability-in-sorting-algorithms/
  402. - Which algorithms can be used on linked lists? Which on arrays? Which on both? Is Quicksort stable?
  403. Implement:
  404. Mergesort
  405. Quicksort
  406. Insertion Sort
  407. Selection Sort
  408. For Curiosity:
  409. Radix Sort: https://www.youtube.com/watch?v=xhr26ia4k38
  410. -----------------------------------------------------
  411. More Knowledge
  412. -----------------------------------------------------
  413. Caches
  414. - LRU cache
  415. NP and NP Complete
  416. - Know about the most famous classes of NP-complete problems, such as traveling salesman and the knapsack problem,
  417. and be able to recognize them when an interviewer asks you them in disguise.
  418. - Know what NP-complete means.
  419. Recursion
  420. - when it is appropriate to use it
  421. open-ended problems
  422. - manipulate strings
  423. - manipulate patterns
  424. Combinatorics (n choose k)
  425. Probability
  426. - https://www.youtube.com/watch?v=sZkAAk9Wwa4
  427. - https://www.youtube.com/watch?v=dNaJg-mLobQ
  428. Dynamic Programming
  429. Scheduling
  430. Weighted random sampling
  431. Implement system routines
  432. Design patterns:
  433. - description:
  434. - https://www.lynda.com/Developer-Programming-Foundations-tutorials/Foundations-Programming-Design-Patterns/135365-2.html
  435. - Patterns: https://www.youtube.com/playlist?list=PLF206E906175C7E07
  436. - UML: https://www.youtube.com/playlist?list=PLGLfVvz_LVvQ5G-LdJ8RLqe-ndo7QITYc
  437. - strategy
  438. - singleton
  439. - adapter
  440. - prototype
  441. - decorator
  442. - visitor
  443. - factory
  444. Operating Systems (25 videos):
  445. - https://www.youtube.com/watch?v=-KWd_eQYLwY&index=2&list=PL-XXv-cvA_iBDyz-ba4yDskqMDY6A1w_c
  446. - https://www.quora.com/What-is-the-difference-between-a-process-and-a-thread
  447. Covers:
  448. Processes, Threads, Concurrency issues
  449. - difference between processes and threads
  450. - processes
  451. - threads
  452. - locks
  453. - mutexes
  454. - semaphores
  455. - monitors
  456. - how they work
  457. - deadlock
  458. - livelock
  459. CPU activity, interrupts, context switching
  460. Modern concurrency constructs with multicore processors
  461. Process resource needs (memory: code, static storage, stack, heap, and also file descriptors, i/o)
  462. Thread resource needs (shares above with other threads in same process but each has its own pc, stack counter, registers and stack)
  463. Forking is really copy on write (read-only) until the new process writes to memory, then it does a full copy.
  464. Context switching
  465. - How context switching is initiated by the operating system and underlying hardware
  466. - threads in C++:
  467. https://www.youtube.com/playlist?list=PL5jc9xFGsL8E12so1wlMS0r0hTQoJL74M
  468. - stopped here: https://www.youtube.com/watch?v=_N0B5ua7oN8&list=PL5jc9xFGsL8E12so1wlMS0r0hTQoJL74M&index=4
  469. Data handling:
  470. - see scalability options below
  471. Distill large data sets to single values
  472. Transform one data set to another
  473. Handling obscenely large amounts of data
  474. System design:
  475. - https://www.quora.com/How-do-I-prepare-to-answer-design-questions-in-a-technical-interview?redirected_qid=1500023
  476. - features sets
  477. - interfaces
  478. - class hierarchies
  479. - designing a system under certain constraints
  480. - simplicity and robustness
  481. - tradeoffs
  482. - performance analysis and optimization
  483. Familiarize yourself with a unix-based code editor: emacs & vi(m)
  484. vi(m):
  485. - https://www.youtube.com/watch?v=5givLEMcINQ&index=1&list=PL13bz4SHGmRxlZVmWQ9DvXo1fEg4UdGkr
  486. - set of 4:
  487. - https://www.youtube.com/watch?v=SI8TeVMX8pk
  488. - https://www.youtube.com/watch?v=F3OO7ZIOaJE
  489. - https://www.youtube.com/watch?v=ZYEccA_nMaI
  490. - https://www.youtube.com/watch?v=1lYD5gwgZIA
  491. emacs:
  492. - https://www.youtube.com/watch?v=hbmV1bnQ-i0
  493. - set of 3:
  494. - https://www.youtube.com/watch?v=ujODL7MD04Q
  495. - https://www.youtube.com/watch?v=XWpsRupJ4II
  496. - https://www.youtube.com/watch?v=paSgzPso-yc
  497. - https://www.youtube.com/watch?v=JWD1Fpdd4Pc
  498. Testing
  499. -------------------------------------------------------------------
  500. Once you're closer to the interview:
  501. - Cracking The Coding Interview Set 2:
  502. - https://www.youtube.com/watch?v=4NIb9l3imAo
  503. - https://www.youtube.com/watch?v=Eg5-tdAwclo
  504. - https://www.youtube.com/watch?v=1fqxMuPmGak
  505. -------------------------------------------------------------------
  506. Extras that can't hurt:
  507. Weighted random sampling
  508. Vector calculus
  509. Computer Security:
  510. - MIT (23 videos): https://www.youtube.com/playlist?list=PLUl4u3cNGP62K2DjQLRxDNRi0z2IRWnNh
  511. Information theory:
  512. - Markov processes:
  513. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/waxgx/core-markov-text-generation
  514. - https://www.coursera.org/learn/data-structures-optimizing-performance/lecture/gZhiC/core-implementing-markov-text-generation
  515. - https://www.khanacademy.org/computing/computer-science/informationtheory/moderninfotheory/v/symbol-rate-information-theory
  516. - includes Markov chain
  517. Bloom Filter
  518. - https://www.youtube.com/watch?v=-SuTGoFYjZs
  519. - http://blog.michaelschmatz.com/2016/04/11/how-to-write-a-bloom-filter-cpp/
  520. Fast Fourier Transform
  521. - http://jakevdp.github.io/blog/2013/08/28/understanding-the-fft/
  522. Machine Learning:
  523. - great course: https://www.coursera.org/learn/machine-learning
  524. - http://www.analyticsvidhya.com/blog/2016/04/neural-networks-python-theano/
  525. - http://www.dataschool.io/
  526. Parallel Programming:
  527. - https://www.coursera.org/learn/parprog1/home/week/1
  528. String search algorithm:
  529. Knuth-Morris-Pratt (KMP):
  530. - https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
  531. - https://www.youtube.com/watch?v=2ogqPWJSftE
  532. Boyer–Moore string search algorithm
  533. - https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm
  534. - https://www.youtube.com/watch?v=xYBM0_dChRE
  535. -------------------------------------------------------------------
  536. Resume:
  537. - http://steve-yegge.blogspot.co.uk/2007_09_01_archive.html
  538. ---------------------------
  539. Be thinking of for when the interview comes:
  540. Think of about 20 interview questions you'll get, along the lines of the items below:
  541. have 2-3 answers for each
  542. Have a story, not just data, about something you accomplished
  543. Why do you want this job?
  544. What's a tough problem you've solved?
  545. Biggest challenges faced?
  546. Best/worst designs seen?
  547. Ideas for improving an existing Google product.
  548. How do you work best, as an individual and as part of a team?
  549. Which of your skills or experiences would be assets in the role and why?
  550. What did you most enjoy at [job x / project y]?
  551. What was the biggest challenge you faced at [job x / project y]?
  552. What was the hardest bug you faced at [job x / project y]?
  553. What did you learn at [job x / project y]?
  554. What would you have done better at [job x / project y]?
  555. ---------------------------
  556. Have questions for the interviewer.
  557. Some of mine (I already may know answer to but want their opinion or team perspective):
  558. - How large is your team?
  559. - What is your dev cycle look like? Do you do waterfall/sprints/agile?
  560. - Are rushes to deadlines common? Or is there flexibility?
  561. - How are decisions made in your team?
  562. - How many meetings do you have per week?
  563. - Do you feel your work environment helps you concentrate?
  564. - What are you working on?
  565. - What do you like about it?
  566. - What is the work life like?
  567. ##########################################################################################
  568. ## Books:
  569. ##########################################################################################
  570. Mentioned in Coaching:
  571. The Algorithm Design Manual (Skiena)
  572. - Book (can rent on kindle): http://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena/dp/1849967202
  573. - Answers: http://www.algorithm.cs.sunysb.edu/algowiki/index.php/The_Algorithms_Design_Manual_(Second_Edition)
  574. Algorithms and Programming: Problems and Solutions:
  575. http://www.amazon.com/Algorithms-Programming-Solutions-Alexander-Shen/dp/0817638474
  576. Once you've understood everything in the daily plan:
  577. read and do exercises from the books below. Then move to coding challenges (further down below)
  578. Read first:
  579. Programming Interviews Exposed: Secrets to Landing Your Next Job, 2nd Edition:
  580. http://www.wiley.com/WileyCDA/WileyTitle/productCd-047012167X.html
  581. Read second:
  582. Cracking the Coding Interview, 6th Edition:
  583. - http://www.amazon.com/Cracking-Coding-Interview-6th-Programming/dp/0984782850/
  584. Additional (not suggested by Google but I added):
  585. * - C Programming Language, Vol 2
  586. * - C++ Primer Plus, 6th Edition
  587. Introduction to Algorithms
  588. - https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844
  589. Programming Pearls:
  590. - http://www.amazon.com/Programming-Pearls-2nd-Jon-Bentley/dp/0201657880
  591. If you see people reference "The Google Resume", it was a book replaced by "Cracking the Coding Interview".
  592. ##########################################################################################
  593. ##########################################################################################
  594. ##
  595. ##
  596. ##
  597. ## Everything below is my recommendation, not Google's, and
  598. ## you may not have enough time to watch or read them all.
  599. ## That's ok. I may not either.
  600. ##
  601. ##
  602. ##
  603. ##########################################################################################
  604. ##########################################################################################
  605. ## Videos:
  606. ##########################################################################################
  607. CSE373 - Analysis of Algorithms (25 videos):
  608. - https://www.youtube.com/watch?v=ZFjhkohHdAA&list=PLOtl7M3yp-DV69F32zdK7YJcNXpTunF2b&index=1
  609. MIT 6.042: Math for CS (25 videos):
  610. - https://www.youtube.com/watch?v=L3LMbpZIKhQ&list=PLB7540DEDD482705B
  611. MIT 6.006: Intro to Algorithms (47 videos):
  612. - https://www.youtube.com/watch?v=HtSuA80QTyo&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&nohtml5=False
  613. MIT 6.033: Computer System Engineering (22 videos):
  614. - https://www.youtube.com/watch?v=zm2VP0kHl1M&list=PL6535748F59DCA484
  615. MIT 6.046: Design and Analysis of Algorithms (34 videos):
  616. - https://www.youtube.com/watch?v=2P-yW7LQr08&list=PLUl4u3cNGP6317WaSNfmCvGym2ucw3oGp
  617. MIT 6.858 Computer Systems Security, Fall 2014 ():
  618. - https://www.youtube.com/watch?v=GqmQg-cszw4&index=1&list=PLUl4u3cNGP62K2DjQLRxDNRi0z2IRWnNh
  619. MIT 6.851: Advanced Data Structures (22 videos):
  620. - https://www.youtube.com/watch?v=T0yzrZL1py0&list=PLUl4u3cNGP61hsJNdULdudlRL493b-XZf&index=1
  621. Stanford: Programming Paradigms (17 videos)
  622. - https://www.youtube.com/watch?v=jTSvthW34GU&list=PLC0B8B318B7394B6F&nohtml5=False
  623. MIT 6.050J Information and Entropy, Spring 2008 ()
  624. - https://www.youtube.com/watch?v=phxsQrZQupo&list=PL_2Bwul6T-A7OldmhGODImZL8KEVE38X7
  625. Introduction to Cryptography:
  626. - https://www.youtube.com/watch?v=2aHkqB2-46k&feature=youtu.be
  627. ##########################################################################################
  628. ## Google:
  629. ##########################################################################################
  630. - How Search Works:
  631. https://www.google.com/insidesearch/howsearchworks/thestory/
  632. https://www.youtube.com/watch?v=BNHR6IQJGZs
  633. https://www.google.com/insidesearch/howsearchworks/
  634. ##########################################################################################
  635. ## Articles:
  636. ##########################################################################################
  637. - https://www.topcoder.com/community/data-science/data-science-tutorials/the-importance-of-algorithms/
  638. - http://highscalability.com/blog/2016/4/4/how-to-remove-duplicates-in-a-large-dataset-reducing-memory.html
  639. - http://highscalability.com/blog/2016/3/23/what-does-etsys-architecture-look-like-today.html
  640. - http://highscalability.com/blog/2016/3/21/to-compress-or-not-to-compress-that-was-ubers-question.html
  641. - http://highscalability.com/blog/2016/3/3/asyncio-tarantool-queue-get-in-the-queue.html
  642. - http://highscalability.com/blog/2016/2/25/when-should-approximate-query-processing-be-used.html
  643. - http://highscalability.com/blog/2016/2/23/googles-transition-from-single-datacenter-to-failover-to-a-n.html
  644. - http://highscalability.com/blog/2016/2/15/egnyte-architecture-lessons-learned-in-building-and-scaling.html
  645. - http://highscalability.com/blog/2016/2/1/a-patreon-architecture-short.html
  646. - http://highscalability.com/blog/2016/1/27/tinder-how-does-one-of-the-largest-recommendation-engines-de.html
  647. - http://highscalability.com/blog/2016/1/25/design-of-a-modern-cache.html
  648. - http://highscalability.com/blog/2016/1/13/live-video-streaming-at-facebook-scale.html
  649. - http://highscalability.com/blog/2016/1/11/a-beginners-guide-to-scaling-to-11-million-users-on-amazons.html
  650. - http://highscalability.com/blog/2015/12/16/how-does-the-use-of-docker-effect-latency.html
  651. - http://highscalability.com/blog/2015/12/14/does-amp-counter-an-existential-threat-to-google.html
  652. - http://highscalability.com/blog/2015/11/9/a-360-degree-view-of-the-entire-netflix-stack.html
  653. ##########################################################################################
  654. ## Papers:
  655. ##########################################################################################
  656. Computing Weak Consistency in Polynomial Time
  657. - http://dl.acm.org/ft_gateway.cfm?id=2767407&ftid=1607485&dwn=1&CFID=627637486&CFTOKEN=49290244
  658. How Developers Search for Code: A Case Study
  659. - http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43835.pdf
  660. Borg, Omega, and Kubernetes
  661. - http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/44843.pdf
  662. Continuous Pipelines at Google
  663. - http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43790.pdf
  664. AddressSanitizer: A Fast Address Sanity Checker
  665. - http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/37752.pdf
  666. ##########################################################################################
  667. ## Coding exercises/challenges:
  668. ##########################################################################################
  669. - https://courses.csail.mit.edu/iap/interview/materials.php
  670. LeetCode: https://leetcode.com/
  671. Project Euler: https://projecteuler.net/index.php?section=problems
  672. TopCoder: https://www.topcoder.com/
  673. More:
  674. HackerRank: https://www.hackerrank.com/
  675. Codility: https://codility.com/programmers/
  676. InterviewCake: https://www.interviewcake.com/
  677. InterviewBit: https://www.interviewbit.com/invite/icjf
  678. ##########################################################################################
  679. ## Maybe:
  680. ##########################################################################################
  681. http://www.gainlo.co/ - Mock interviewers from big companies
  682. ##########################################################################################
  683. ## Code References:
  684. ##########################################################################################
  685. For review questions in C book:
  686. https://github.com/lekkas/c-algorithms
  687. ##########################################################################################
  688. ## Once you've got the job (this is mainly for me):
  689. ##########################################################################################
  690. Books:
  691. Clean Code
  692. Code Complete
  693. How to Prove It: A Structured Approach, 2nd Edition
  694. Unix Power Tools, Third Edition
  695. * - C++ Seasoning:
  696. - https://www.youtube.com/watch?v=qH6sSOr-yk8
  697. * - Better Code: Data Structures:
  698. - https://www.youtube.com/watch?v=sWgDk-o-6ZE
  699. C++ Talks at CPPCon:
  700. - https://www.youtube.com/watch?v=hEx5DNLWGgA&index=2&list=PLHTh1InhhwT75gykhs7pqcR_uSiG601oh
  701. MIT CMS.611J Creating Video Games, Fall 2014
  702. - https://www.youtube.com/watch?v=pfDfriSjFbY&list=PLUl4u3cNGP61V4W6yRm1Am5zI94m33dXk
  703. Compilers:
  704. - https://class.coursera.org/compilers-004/lecture
  705. Computer and processor architecture:
  706. - https://class.coursera.org/comparch-003/lecture
  707. Long series of C++ videos:
  708. - https://www.youtube.com/playlist?list=PLfVsf4Bjg79Cu5MYkyJ-u4SyQmMhFeC1C
  709. ##########################################################################################
  710. ## Done. ##
  711. ##########################################################################################