Technical Interviews: Difference between revisions

Line 10: Line 10:
* Dynamic Programming
* Dynamic Programming
* Greedy (sorting + take the best at each step)
* Greedy (sorting + take the best at each step)
* Linear searching (with 2 pointers)
* Linear searching (with 2 pointers or sliding window)
** Usually the answer if you're searching for a connected segment along an array
** Usually the answer if you're searching for a connected segment along an array or string
** E.g. max contiguous subarray
** E.g. max contiguous subarray
Be familiar with common algorithms and data structures:
;Sorting
* Merge sort
* Quicksort
* Quickselect
* Counting sort
* Radix sort
* Binary search
;Linked-lists
* Doubly linked list, circular linked list
;Trees
* Preorder, inorder, postorder traversal
* AVL rotations
* Union-Find
* Using <code>std::set</code>, <code>std::map</code>
;Graphs
* DFS, BFS
* Minimum spanning tree (Prim's or Kruskal's algorithm)
;Hashing
* Using <code>std::unordered_set</code> and <code>std::unordered_map</code>


==Computer Systems==
==Computer Systems==