Interview Prep
About more than just getting the "right" answer.
Employers want to see you demonstrating a careful, methodical thought process.

1. Listen Carefully
- Mentally record unique information
- Write down pertinent info on whiteboard
Examples:
- Given two arrays that are sorted, find the median
- "Design an algorithm to be run repeatedly on a server that..."
2. Draw an Example
- Specific
- Sufficiently large
- Not a special case
Example:
A binary search tree
3. State a Brute Force
- Give the solution that comes to you first even if it sounds simple and not optimal
4. Optimize
BUD, DIY, Base Case, Data Structure Brainstorm, Simplify and Generalize
Hash Table
5. Walk Through
After you nail down your optimal algorithm, think about
- structure
- steps
- variables
so that you understand exactly what you're about to write
6. Implement
- Write the code
- Write small
- Start at the top left corner of the board
- Write sandwich code so you don't have compilation errors
- Write a todo, if needed
- Leave room for testing
7. Test
If you run into any errors, solve them!
Optimize & Solve Techniques
- Look for BUD
- DIY
- Simplify & Generalize
- Base Case & Build
- Data Structure Brainstorm
Practice, Practice, Practice
Get into groups of 4
Write a method to check if 2 given words are anagrams.
- Interviewer
- Interviewee
- Compiler
- Timer
Write FizzBuzz with as few if statements as possible. It's possible without any conditionals at all.
Implement a function which calculates the n-th item of Fibonacci sequence
Find largest prime palindrome less than 1000
Interview Prep
By Dize Hacioglu
Interview Prep
- 204