Continuing with the theme of interviewing, I’d like to talk a little bit about style. One of the things interviewers are looking for is your style of code. They have seen tons of people solve their question and they want to see not only if you can solve it, but how you solve it. Do you like to write really terse code? Can I read your code easily?
You: What!? In a 45 minute interview, they expect a solution written in nice code? Continue reading Write Code For Others
Greetings, I come in peace!
Today, I’d like to hit the ground running by telling you how to solve my favorite interview question, step-by-step. I’ve asked this question to over 250 candidates and it does a great job testing basic software skills.
First, the question:
We know that spreadsheet applications use letters to name their columns. For example, the first column is labled 'A' and second is 'B'. Eventually, we get to 'Z', and then 'AA', 'AB', and so on.
Let's write a function that, when given the name of a column, returns its index. So 'A' would return 1, 'B' would return 2, 'Z' would return 26 and 'AA' would return 27.
Let’s talk a little bit about these types of problems. There are systematic techniques to approach problem solving and our goal is to explicitly define them. That way, they become concrete tools in your problem solving toolbox. Once you have these tools, if your intuition fails you, you can reach into your toolbox and see if anything can get you unstuck. Continue reading Favorite Interview Question