- Validate you understand the problem
- Ensure you are using intervew time to answer the questions asked
- Display your ability to summarize
- Establish the constraints and bounds: Bounds will dictate what solutions are feasible
- Begin to think about run time
- Ask for sample input: are you working with integers? strings? etc.
- Ask about special characteristics of variables: negative numbers? only alpha characters?
- Identify possible inaccurate assumptions: is the input sorted already?
- Write the pros/cons
- Work with your interviewer
- Ideally an object oriented language like Java, C#, or Python
- Start identifying possible tricky scenarios
- Write out a few test cases
- Listen for hints from the interviewer
- Strive for clean and runnable code
- Draw pictures, provide pseudocode, and eventually write code
- Run your test cases through your program
- Try out some edge cases. Did you miss any?
- What's the runtime and spacetime complexity of your solution?
- Where can your solution be improved?
- There questions are meant to push you!
- It's okay to say don't remember something, but don't give up!