# Technical Interview Preparation - Data Structures and Algorithms Many developers find that most companies often spend much of the interview asking computer science and algorithm questions. For a detailed breakdown index of topics, check [this heapclub resource](https://heapclub.gitbook.io/heapclub-algorithms/interview-preparation/important-topics). ## Online Video Practice * [InterviewBuddy](https://www.interviewbuddy.in/) * [Pramp](https://www.pramp.com/) - 1:1 Peer-based interview * [InterviewBit Mock Interviews](https://www.interviewbit.com/mock-interview/) * [Interviewing.io](https://interviewing.io/) * [MyInterviewPractice](https://www.myinterviewpractice.com/) ## Interactive * [InterviewBit](https://interviewbit.com) - Online site for practicing interview questions * [Firecode](https://www.firecode.io/) - Free interactive coding challenges. * [LeetCode](https://leetcode.com/) * [Learneroo](https://www.learneroo.com/subjects/8) * [Adaface](https://www.adaface.com/) - Coding assessments tests for Candidates ## Courses * [Udacity Interview Course](https://www.udacity.com/course/technical-interview--ud513) * [Cousera Interview Course](https://www.coursera.org/learn/introduction-to-algorithms) * [Selenium Complete Course](https://artoftesting.com/selenium-tutorial) * [Scaler's Data Structures and Algorithm Course](https://www.scaler.com/courses/data-structures-and-algorithms) ## Articles * [Ace the coding interview, every time](https://medium.com/@nickciubotariu/ace-the-coding-interview-every-time-d169ce1fd3fc#.3w767vppf) * [Get That Job at Google](http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html) ## Cheat Sheets * [Google Interview University](https://github.com/jwasham/google-interview-university) * [Tech Interview Cheat Sheet](https://gist.github.com/TSiege/cbb0507082bb18ff7e4b) * [Algorithms, Data Structures, & Big O Cheat Sheet](http://cooervo.github.io/Algorithms-DataStructures-BigONotation/) * [Big O Cheat Sheet](http://bigocheatsheet.com/) * [Princeton Algorithms and Data Structures Cheat Sheet](http://algs4.cs.princeton.edu/cheatsheet/) * [Algorithmic Cheat Sheet](https://sinon.org/algorithms/#data-structures) ## Explainers * Big O & Complexity Analysis * [Big O Notation](https://www.interviewcake.com/article/java/big-o-notation-time-and-space-complexity) * [The Idiots Guide to Big O](http://www.corejavainterviewquestions.com/idiots-guide-big-o/) * Java * [Guide to Selecting Appropriate Map/Collection in Java](http://www.sergiy.ca/guide-to-selecting-appropriate-map-collection-in-java/) * Visualizations * [VisuAlgo](http://visualgo.net/) - visualising data structures and algorithms through animation * [15 Sorting Algorithms in 6 Minutes](https://www.youtube.com/watch?v=kPRA0W1kECg) * [Data Structure Visualizations](https://www.cs.usfca.edu/~galles/visualization/Algorithms.html) * [Sorting Algorithms Animations](https://www.toptal.com/developers/sorting-algorithms/#) ## Code * [Algorithms and Data Structures implemented in Java](https://github.com/phishman3579/java-algorithms-implementation) ## Books * [Elements of Programming Interviews](https://www.amazon.com/Elements-Programming-Interviews-Insiders-Guide/dp/1479274836) * [Cracking the Coding Interview](https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/098478280X) * [Algorithms (4th Edition)](http://www.amazon.com/gp/product/032157351X/) * [Algorithms in a Nutshell](https://www.amazon.com/Algorithms-Nutshell-OReilly-George-Heineman/dp/059651624X) ## Other Resources * [InterviewCake](https://www.interviewcake.com/) * [CareerCup](https://www.careercup.com/) * [ProjectPro](https://www.projectpro.io/projects/data-science-projects) ## Concept Overview The "computer science" technical interviews are probably one of the most important parts of getting a job at a company like Facebook, Google, or Microsoft. You need to understand them to be prepared for an interview. Studying for these problems is the best way to become comfortable enough to be able to solve challenges they throw at you. These questions are about topics such as: - Data Structures (Linked List, Binary Tree, Graphs) - Data Traversal and Manipulation (Sorting, Constructing) - String and Token Parsing - Array Manipulation - Regular Expressions - Combinatorial Sets or Permutations - Recursive Algorithms Here's a few specific topics in-more depth to ensure you are familiar with (sourced from [this article](http://steve-yegge.blogspot.com/2008/03/get-that-job-at-google.html)): - **Algorithm Complexity**: you need to know Big-O. It's a must. If you struggle with basic big-O complexity analysis, then you are almost guaranteed not to get hired. It's, like, one chapter in the beginning of one theory of computation book, so just go read it. You can do it. - **Sorting**: know how to sort. Don't do bubble-sort. You should know the details of at least one n*log(n) sorting algorithm, preferably two (say, quicksort and merge sort). Merge sort can be highly useful in situations where quicksort is impractical, so take a look at it. - **Hashtables**: hashtables are arguably the single most important data structure known to mankind. You _absolutely have to know how they work_. Again, it's like one chapter in one data structures book, so just go read about them. You should be able to implement one using only arrays in your favorite language, in about the space of one interview. - **Trees**: you should know about trees. basic tree construction, traversal and manipulation algorithms. You should be familiar with binary trees, n-ary trees, and trie-trees at the very least. Trees are probably the best source of practice problems for your long-term warmup exercises.You should be familiar with at least one flavor of balanced binary tree, whether it's a red/black tree, a splay tree or an AVL tree. You should actually know how it's implemented. You should know about tree traversal algorithms: BFS and DFS, and know the difference between inorder, postorder and preorder. - **Graph:** There are three basic ways to represent a graph in memory (objects and pointers, matrix, and adjacency list), and you should familiarize yourself with each representation and its pros and cons. You should know the basic graph traversal algorithms: breadth-first search and depth-first search. You should know their computational complexity, their tradeoffs, and how to implement them in real code. If you understand these topics, that should act as a baseline for being prepared for an "algorithms"-based interview.