Coding Kata – January 27 2010 – The Ski Lift

1.27.2010 | Kata

Goal: Create an algorithm to determine how close you are to the summit of a mountain (percentage) whilst on a chairlift. You know the following information:

  • What chair you are on
  • The chair coming in the opposite direction visible to your left at the current time

At what point do you have an accurate estimate of your progress? When you are at that point, what is your percentage progress to the top?

Constraints: You are not given the number of chairs on the chairlift.


Comments