The Supermarket Queue
λ¬Έμ
queueTime([5,3,4], 1) // should return 12 // because when there is 1 till, the total time is just the sum of the times queueTime([10,2,3,3], 2) // should return 10 // because here n=2 and the 2nd, 3rd, and 4th people in the // queue finish before the 1st person has finished. queueTime([2,3,10], 2) // should return 12
λ¬Έμ μ΄ν΄
ν΄κ²° λ°©λ²
μ½λ ꡬν
κ²°κ³Ό λΆμ
Last updated