(Before the Interview) What you need to know Flashcards
Linked Lists
Linear collection of elements, called nodes, each pointing to the next by means of a pointer
Binary Trees
A tree structure where each node has at most 2 children
Stacks
Collection of elements where popping an item returns the last item pushed to the list
Queues
Collection of elements where popping an item returns the first item added to the list not yet removed (removal of entities from the terminal position
Vectors / ArrayList
One dimensional array
Hash Tables
Associative array mapping keys to values
Breadth-first search
Explores all neighbors in a level of a tree before moving to children (all nodes in next level)
Depth-first search
Explores as far as possible along each branch until backtracking
Binary Search
Finds target value in sorted array by recursively searching each half-interval
Merge sort
Recursively divides by 2 and sorts each half-interval of array. Last step 2 halves are returned and these sorted halves are merged
Quick Sort
Recursively pick a pivot, partition and sort left and right halves. Base case is of a pivot position with 0 or 1 on either side of the pivot.
Tree Insert
?
Bit manipulation
?
Factory Design Pattern
?
Memory (Stack vs Heap)
?