title | type | duration | creator | ||||
---|---|---|---|---|---|---|---|
Whiteboarding Practice HW |
Homework |
1:00 |
|
Note: You can help each other, but everyone must submit their own code
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.
- Complete these problems from CodingBat, first on whiteboard or paper, then you can check them on the website:
- Fork & clone this repo, then type or paste your code into a .java file (it can be in an IntelliJ project, or just a single .java file all by itself, either way is fine)
- Finally, push your code and submit a pull request; put your name in the title of the pull request
Bonus Problems
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.