title type duration creator
Whiteboarding Practice HW
Homework
1:00
name city
Charlie Drews
NYC

Whiteboarding Practice

Note: You can help each other, but everyone must submit their own code

Exercise

You are going to practice your whiteboarding skills by completing some problems from CodingBat. Please write these out on a whiteboard or on paper BEFORE typing any code on your computer. Consider talking out loud while you think through the problem, as if you were with an interviewer. It will feel silly, but it's great practice!

If you draw a blank looking at a problem, here are some questions to ask yourself:

  • What is the method signature? (what is the return type, what are the parameters - CodingBat provides this for you, but interviewers won't)
  • What control flow statement(s) do you need? (loop, if/else, etc)
  • Do you need any local variables to temporarily hold any data?
  • Are there any "edge cases" or invalid/unexpected input to look out for?

During an interview, you can ask yourself these questions out loud, and answer them out loud too. This is a good way to show the interviewer your thought process, and it gives you opportunities to ask clarifying questions and confirm your assumptions with the interviewer.

Requirements

Bonus Problems

  1. http://codingbat.com/prob/p120347
  2. http://codingbat.com/prob/p183562

Deliverable

Your pull request including your code for each of the 3 required problems. If you have time, try to add the 2 bonus problems as well.