Taro Logo
Profile picture

Peloton Interview Guide

Process Quality

With 40% of Senior Software Engineers reporting a positive experience, 20% reporting a neutral experience, and 40% reporting a negative experience, Senior Software Engineers overall have mixed feelings towards Peloton's interview process.

0

Interview Toughness

Peloton's interview process is very selective, failing most Senior Software Engineers who go through it. Only 30% of Senior Software Engineers pass while the remaining 70% are rejected.

30%

Showing 3 of 10 interview experiences

Senior Software Engineer

Senior Software Engineer

New York, New York • November 12, 2022

Neutral ExperienceNo Offer

Process

2 Design (data and architecture) and 1 Coding round. This text box is asking me to enter a minimum of 30 words, but I don't have that much, hence writing this. Please ignore.

Questions

We want to be able to give the user a breakdown of how much time, over the duration of the workout, they spent in each heart rate zone.

I.e., we want to be able to display the user a report like:

Great job on your 30-minute HIIT class! Here's a breakdown of how much time you spent in each of your heart rate zones:

  • PEAK: 7 minutes
  • CARDIO: 10 minutes
  • FAT BURN: 10 minutes
  • WARM UP: 3 minutes

To do so, we need to write a function to calculate how much time over the workout duration was spent in each heart rate zone.

We'll use 4 standard heart rate zones, which we can represent as a list of pairs:

  • WARM UP: 0 - 60 percent of the user's maximum heart rate (0, 60)
  • FAT BURN: 60 - 75 percent of the user's maximum heart rate (60, 75)
  • CARDIO: 75 - 85 percent of the user's maximum heart rate (75, 85)
  • PEAK: 85 - 100 percent of the user's maximum heart rate (85, 100)

If a user's heart rate falls on the border of the upper and lower range of a zone, we'll bucket them into the upper zone. For example, if we end up with a set of zones [(157, 185), (139, 157), (111, 139), (0, 111)], a heart rate of 157 will be considered in the (157, 185) heart rate zone.

Write a function "timeInHeartRateZonesForWorkout" given:

  • An array of (time, bpm) integer pairs for a user.
  • The ending time of the exercise (in seconds from start).
  • The user's maximum heart rate, which is used to calculate their heart rate zones.

The function should return an array of seconds the exerciser spent in each heart rate zone, sorted from PEAK to WARM UP. If the exerciser did not spend any time in one of the four zones, return 0 for that zone.

For example, given an array of times and beats per minute:

[(49, 170), (50, 90), (60, 120), (70, 135), (100, 150), (300, 180), (400, 75)], a maximum heart rate of 185, and a workout duration of 500, the function should return [100, 200, 40, 160]. The exerciser spent 100 seconds in PEAK, 200 in CARDIO, 40 in FAT BURN, and 160 in WARM UP.

Interviewer Notes:

  • All times and beats per minute are always positive, whole numbers.
  • Any time before the first data point is spent in the WARM UP zone.