Software Engineering Interview Questions that Make an Impact

Compared to others, I haven’t had that many interviews: one for my freshman year internship, three sophomore year, and none in the foreseeable future, as I’ve accepted an offer to go back as an intern to Citadel, which I’ve written about a couple of times before. Despite the small number, I routinely find people entertained when I retell my interviews, so I decided to document them here, so that I don’t forget.

Before I go into my spiel, do a quick read of The Most Revealing Job Interview Question. I found it quite ingenious.

Questions

I have a program that crashes, what is wrong with it?

At first glance this program may seem nonsensical, but after an answer is given, the interviewer knows what the candidate has gone through and gets a more well rounded look at the candidate. Obviously, there isn’t a right or wrong answer. The goal of the question is for the candidate to list possibilities and then come up with solutions. Answers had to include actual experiences, one couldn’t rattle off bugs they’ve only heard about.

I scoffed at the question upon hearing it, but after realizing the interviewer was serious, my mind started racing through all C# exceptions. Odd because I was interviewing at Citadel, which is a C++ firm. Here are the things that I mentioned:

Does the stack grow up or down? Prove it.

This question demonstrates knowledge on the machine level, which leans more into the domain of the computer engineer; however, if a programmer doesn’t know how the underlying machine is structured, how can they write efficient code that takes advantage of the machine? Since the University of Michigan is a more infrastructure based programming college, I luckily knew the answer to the first part : down. Proving it is a bit harder, and I needed a hint from the interviewer.

The answer is simple. Create a function with a local variable. Print out the local variable’s address. Call the function recursively. With each call the local variable should have lower memory address than the one before it. This is most straightforward in C/C++. In some languages it might not even be possible to retrieve the address of a variable.

Have you contributed to open source?

Not at the time I hadn’t. I said I had released software as free, but none of it was open source nor had I contributed code to other projects. I then received a short lecture about contributing to open source demonstrates that one can read someone else’s code and add to it. Many times when handed a project that has seen its fair share of time (I’m refraining from calling it a legacy project as that has negative connotations), people want to start from scratch. My own opinion here, but I feel like that could stem from laziness. I know I reboot projects of mine all the time and whether the reboot can be considered a success is sometimes up for debate.

This question really led me to reevaluate my opinion of open source and want to contribute more. Since then, I’ve helped out more than a few projects on Github.

You have 25 horses and want to find the fastest three. You have no stopwatch but from a race you know the rankings. A race can have up to five horses.

Probably one of the only questions that I know the process to solve, but haven’t actually gone through to get an answer. During the interview, I gave a sub-optimal answer, and after a hint I was on the right track but the interviewer moved on to another question. The trick is after the initial five races, race each of the top horses and those that got 4th and 5th, their entire bracket can be discarded. The reason I include this question with the others, is that no one who I have asked has gotten the correct process let alone come to an answer. The question, I believe, is too hard and not on topic when it comes to being a software engineer. And let’s be realistic, who doesn’t have a stopwatch?

Tips

Comments

If you'd like to leave a comment, please email [email protected]

2020-04-01 - Peter

Great article, though I was hoping to see more examples of interview questions that tackle software engineering concepts. For example like some of these software engineering interview questions: https://www.testdome.com/d/software-engineering-interview-questions/500