Hoo's Tech Interviews: The Algorithms Interview

Tyler Macaluso – October 19th, 2017

Have a technical interview coming up and have no idea what to expect? Want to learn how to gain a competitive edge in the interview process over other applicants?

 

This is the third publication of a multi-part series on Tech Interviews for Hoo's. Each publication will include different types of tech interviews you might be exposed to, a general overview of how each kind of interview works, and tips and techniques regarding the actions you should take during the interview to help you ace the interview and continue on with the rest of the hiring process.

 

The Algorithms Interview

One of the most common situations during a technical interview is to be asked to design an algorithm to solve a particular problem, optimize a pre-given function, or something along the same lines. When presented with a problem like this, there is no universally correct course of action, however there are methods of approach towards the problem that tend to yield better results. The following are guidelines of one common and very successful approach to these kinds of problems:

  • Make sure that you understand the problem space and it's requirements! Asking questions about the scope of the problem as well as any problem requirements that seem unclear is a good place to start. Conversely, taking some quiet time to think through the problem before tackling it can also be very beneficial. either way ensure that no aspect of what is being asked of you is unclear because this can slow you down later on in the interview, or even lead you down the wrong path from the beginning.
  • Try to initially come up with a solution- any solution, regardless of how inefficient or convoluted it might be! This will help put your thought process in the correct frame within the problem space, making it easier to improve upon your preliminary solution or even thinking of a whole new solution that better fits the problem. Additionally, coming up with a rudimentary solution in the beginning allows you to bank on that solution in the end if you are unable to create anything better by the time the interview ends.
  • Begin working through the problem/ refining your solution- this is should be done by writing down/ diagramming your thoughts as well as speaking out loud as you try to solve the problem. These methods help prevent you from getting lost in your thought process towards the solution, offer the possibility of revealing aspects of the problem that you didn't even know you still missing, and finally it helps give insight into your problem-solving skills to the interviewer.
  • Think algorithms and data structures! A common approach towards these problems is to take a more bottom-up approach where the specifics of the problem define different aspects of the solution, however often times it can be very useful to consider the problem from the opposite approach- think about different general algorithms and data structures and how they may relate to the problem as this can provide new insight and progress towards a potential or better solution. Additionally, drawing on past solutions to similar problems can be extremely beneficial
  • Don't be afraid to break down the problem into sub-problems, or to back-track through your solution- these are both very valuable skills that show flexibility and a capacity for problem-solving, as well as helping you cognitively process the problem

Overall, stay calm and collected throughout the problem, make sure you know what is being asked of you, draw on past knowledge to offer current insight, and believe in yourself!\

 

Much of the information included within these blog posts was compiled from Career Center Website resources and Palantir.com, two resources which would be great places to look for more information on a specific type of interview!

 

<---- Previous: Hoo's Tech Interviews- Coding Interviews