It was supposed to be an exploratory call, but it turned out to be a tech screen. The recruiter was very friendly and helpful. There were three questions from HackerRank to solve in 30 minutes.
There are n people standing in line to buy show tickets. Due to high demand, the venue sells tickets according to the following rules:
We represent the initial line of n people as an array, tickets = [ticket(0), ticket(1), ..., ticket(n-1)], where tickets[i] denotes the number of tickets that person i wishes to buy. If Jesse is located at position p, how many seconds will it take for him to purchase his tickets?
For example, if tickets = [1, 2, 5] and p = 1, the first five seconds unfold as follows:
Following rules should apply:
Find the time taken.
The following metrics were computed from 102 interview experiences for the Apple Senior Software Engineer role in United States.
Apple's interview process for their Senior Software Engineer roles in the United States is very selective, failing most engineers who go through it.
Candidates reported having good feelings for Apple's Senior Software Engineer interview process in United States.