Google Sample Questions Flashcards

1
Q

Ratio Finder

Given a list of conversion rates (formatted in the language of your choice) as a collection of origin unit, destination unit, and multiplier, for example:

  • foot-inch: 12
  • foot-yard: 0.3333333
  • etc…

Such that ORIGIN * MULTIPLIER = DESTINATION, design an algorithm that takes two arbitrary unit values and returns the conversion rate between them.

A

https://medium.com/@alexgolec/google-interview-problems-ratio-finder-d7aa8bf201e3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly