Amazon SDE 2 Onsite
Company: Amazon
Role: SDE 2
Interview Stage: Onsite
Location: unknown
Year: unknown
Original Post Content:
Problem was, you have a report of jobs, the jobs have a historical completion time, some jobs can be ran in parallel, write a function that can calculate the estimated completion time for those jobs.
I asked a lot of questions, and every answer was "you can assume" she did not give me any details, so I came up with the input as a dictionary like so, report = {1: [30, True], 2:[10,False]}, the key is the job and the list is the time and boolean for running parallel. I said that if a group of jobs run parallel then only the job with the longest runtime would change the overall time completion estimate. It was a very simple loop through the jobs, if the job was parallel, only change if it was greater than the max parallel (which was a variable), then if not parallel, increase our overall time, and at the end add the max parallel to the total time completion. This seemed too simple and easy especially for a SDE 2 role, but I could not get the interviewer to answer any questions that I asked.
Please comment if you have seen something similar at Amazon, or just to help others. Will update in a week on an offer or not.