Whiteboard interviews and technical phone screens are just part and parcel of working as a Software Engineer. Besides learning the data structures and algorithsm you need, the only way to get good at interviewing is to practice. Here is a brief set of steps you can keep in mind while interviewing.
Read and Understand the Problem
- Read it slowly.
- Read it again/get it repeated to you.
- Try and think about what assumptions are hiding in this problem.
- Ask questions about those assumptions (either to yourself or the interviewer). Nothing is worse than solving the wrong problem.
- Identify the inputs and outputs
- Try and indentify any obvious edge cases