Google Interview Problems: Ratio Finder (26 minute read)
This article is part of a series that discusses interview questions that have been asked at Google in the past, with the other articles discussing dynamic programming, matrix exponentiation, and query synonymity. Interview questions should be designed so employers can make a decision of whether a candidate is worth hiring. The Ratio Finder question was chosen because it was a little easier, but still showed the candidates' strengths and weaknesses. Candidates were asked to design a system to convert between two units, for example, hands to light-years. While many will start thinking of a solution to the problem, strong candidates would think about how the program could fail. The success of the candidates depends on their ability to plan forward for potential problems, how complete the solution is, and what ideas they have to improve the code design.