audibleblink / Interview Log
Programming Languages
Interview Logs
I have this strange obsession with collecting interview/whiteboard questions. Here are a couple of questions I've collected over the past few weeks.
They're not separated by language since the problems themselves aren't language specific, but not all of them are written in the same language.
Feel free to submit a pull request with your annotated solution in another language.
How to Whiteboard
An interviewer at Google once laid out some really useful tips to me for Whiteboarding. Running through these steps with an interviewer helps keep you moving forward. By asking for the following, you begin to see the many parts of your problem and you can begin mapping out what it's going to take to solve it. It also gives you some canned phrases that you can use that show the interviewer you're thinking about things like interface and complexity while you code. Win/win.
- Ask for the function signature
- What are the inputs?
- What Type are the inputs?
- What Type is the return?
- Ask for examples
- Useful because you can turn these into tests
- If you're on something like Stypi or Coderpad, ALWAYS write your tests first
- Clarify constraints
- Is the interviewer more concerned with HOW you solve it, or simply THAT you solve it?
- What complexity is acceptable?
- Talk it out as much as possible
I've written these out for most of the questions here. My hope is that Whiteboarding without this information becomes foreign to you and asking for this information becomes second nature.
Table of Contents
Implement a Datastructure
Logic
- Make Change
- Squared Sums
- Binary Conversion
- Brace Checker
- Number is a Palindrome?
- Prime Factors
- Reverse a String
- TODO: Second to Last
How Does The Web Work?
Also know as
What happens when I type 'google.com' in a browser bar and hit enter
This is a common one. Below is a tl:dr that satisfies most interviewers. The deeper you go though, the better.