4 ms·
A Google Interview Question
I recently interviewed with Google for a product manager position. I wasn’t really looking since I have been actively working on my startup. But since the Google recruiter found me on LinkedIn and reached out to me, I went ahead and gave the whole interview process a shot. Overall, the process was professional and well organized. I thought I answered most of the questions well except for this one:
For any given day, calculate the total number of miles traveled by all the passengers using the subway.
Just want to share this!
- dukecitypal 15y agoApproximate population of NYC = 20 million Assuming 40% of population rides subway everyday no. of passengers = 8 million Avg miles ridden by each passenger let's say is 10. Total miles ridden = 80 million miles. Way too many assumptions. Are they sensible? I don't know.
- summereyes 15y agoselect sum(distance_between_subway_stops(entered,exited) from subway_info where date=any_given_day;
- ashbrahma 15y agoAny chance you can share your contact information so I can ask you some questions about the process?
- vijaymv_in 15y agoHere is how I would have approached. The average commute time is 40 mins for New Yorker. The population is 12 millions and during a work day it goes up to 20 million. So I assumer 20 Ml . Out of the 40 mins assume 20 mins spend on 15 mins- 20 mins spend on path, LIRR, NJ Transit etc.. so this gives around 20 - 25 mins of average commute in subway. Assuming arounds 40 percentage uses subway 8 million * 5 - 7 miles= 40 - 50 million miles..
- vijaymv_in 15y agoHere is how I would have approached. The average commute time is 40 mins for New Yorker. The population is 12 millions and during a work day it goes up to 20 million. So I assumer 20 Ml . Out of the 40 mins assume 20 mins spend on 15 mins- 20 mins spend on path, LIRR, NJ Transit etc.. so this gives around 20 - 25 mins of average commute in subway. Assuming arounds 40 percentage uses subway 8 million * 5 - 7 miles= 40 - 50 million miles..