Whiteboard Coding Interviews: 6 Steps to Solve Any Problem
How to Ace a Technical Interview
In this video, the speaker discusses how to prepare for and succeed in a technical interview. The speaker introduces the REACTO approach to solving interview questions.
The REACTO Approach
- The REACTO approach stands for Repeat, Examples, Approach, Code Implementation, Test Code, and Optimization.
- Start by repeating the question to ensure you understand it fully.
- Write out examples of input/output to better understand the problem.
- Describe your approach and thought process to give insight into your logic.
- Implement the code based on your approach.
- Test your code with different inputs and outputs.
- Discuss optimization strategies for improving your solution.
Tips for Success
- Technical interviews can be intimidating but practice can help alleviate nerves.
- Even experienced developers still get nervous during technical interviews.
- Repeating the question and writing out examples can help you better understand the problem and keep the conversation flowing with the interviewer.
- Describing your approach gives insight into your thought process and helps ensure you're on the right track.
- Testing your code with different inputs/outputs ensures that it works as expected in various scenarios.
Approaching the Problem
In this section, the speaker discusses how to approach a coding problem during an interview.
Confirming Approach
- Before starting to write code, confirm your approach with the interviewer.
- Once you have confirmed your approach, start writing code while going down the path of writing code.
Breath First Coding
- Decompose your approach down into high-level functions instead of imperative things that you're doing.
- Use breath first coding to break down from a high level your approach into smaller steps.
- This helps avoid getting caught up on trivial but complex details and ensures that you focus on the core algorithm.
Tips for Coding in an Interview
In this section, the speaker provides tips for coding in an interview setting.
Additional Tips for Coding
- Leave yourself room between each line for edits since it's hard to edit on a whiteboard.
- Star things that you're not sure about so that you can go back and check them later. This shows that your confidence level matches with the interviewer's understanding of your confidence level in what you're saying.
REACTO Framework
In this section, the speaker introduces the REACTO framework for approaching coding interview questions.
Steps in the REACTO Framework
- R - Read and Repeat
- Repeating the question to ensure understanding.
- E - Examples and Edge Cases
- Providing examples and edge cases to clarify requirements.
- A - Approach
- Describing a high-level approach to solving the problem.
- C - Code
- Writing code that implements the approach.
- T - Test
- Testing the code with examples and marking variables as you go through them.
- O - Optimization and Runtime
- Discussing how well the algorithm will perform for large datasets.
Additional Advice
- Stay calm during interviews.
- Give your brain time to think before writing code.
- Start a conversation with your interviewer to keep it flowing.
Tips for Technical Interviews
In this section, the speaker provides tips for technical interviews.
Algorithm Naming
- The speaker advises that it is important to know the names of algorithms and their creators.
- If you don't know the answer or trick, it's unlikely that you will come up with it on the spot.
- Knowing algorithm names shows that you have been exposed to information.
Communication Skills
- Don't stress out if you don't know the answer. Sometimes it's okay.
- Make it a conversation and ask questions when stuck.
- Keep talking and verbalize what's going on in your mind.
- Learn to read the interviewer's response to your thoughts.
Writing Code
- Don't start writing code right away. Give examples and describe your approach before touching the marker.
- Practice using frameworks like REACTO.
- Repeat the question, list examples, describe your approach, write code, test examples, and talk about optimization.