Interviewed at Nuro for the L4 position. 2 questions, 45 min each.
Question 1:
Write a random number generation function with weights. The function class must have 4 functions:
- add (add a weight and letter)
- generate (generate the random letter from the weights)
- remove (remove a weight)
Similar to this LeetCode problem: 528. Random Pick with Weight.
Question 2:
System design: design a system to place jobs in a queue. The jobs have multiple stages, and some stages require more GPU than CPU. Expected to use a queue and a database, and then have a GPU cluster in addition to a CPU cluster.
Discussion
Loading comments…