reading-notes

DSA Review

Whiteboard Advice

If a number is a multiple of 3, the output will instead be fizz. If a number is a multiple of 5, the output will instead be buzz. However, if the output is a multiple of both 3 and 5, the output will instead be fizzbuzz. Is my understanding correct?”

- Make sure to ask about edge cases
- By stating edge cases, it shows you will be good at preventing bugs.
- Example of asking about edge cases:

“Now that I confirmed my understanding of the problem, I’d like to ask about some potential edge cases. Is it possible that the input would be a type other than a number? If so, what should the function do? Can the input be 0 or negative? Again, if so, what should the function do?” ```

7 Tips:

  1. Take a few minutes
    • You can ask for a few mins to think the problem through. Just communicate you are going to do so.
  2. Write down steps of the solution
    • Basically, this is the alogorithm portion of whiteboarding.
  3. Write pseudocode first
    • Pseudo code defined as some half-baked code-looking stuff that lays out the structure of how your code will work.
    • Just verify the logic is correct
  4. Don’t sweat the small stuff
    • Technical interviews are about demonstrating depth and breadth of knowledge, personal strengths, and problem-solving abilities.
    • Brush off mistakes and move on.
  5. Sit down. Be humble.
    • When given critiques, take it and be grateful! DO NOT be defensive!
  6. Come prepared
    • This is good for your state of mind in and after the interview.
  7. Review your work
    • If you have time, review your work! If your work is wrong, you still have time to correct it.
    • These two areas are really important to review:
    • Algorithmic efficiency: Review whether or not you have found the fastest and most optimal solution given the requirements.
    • Correctness: Check for edge cases and off-by-one errors. At least look for ways to improve the correctness of your solution.