Company: Uber
Difficulty: medium
Stock Car Race Elimination All the competitors in a stock car race have completed their qualifying laps. Each lap, the driver with the current slowest \"best\" time is eliminated (that is, the highest personal best time). If multiple drivers tie for the slowest time, they are all eliminated. You are given a two-dimensional string array with each driver\'s name and lap time in seconds for each lap. Your task is to return the drivers in the order in which they were eliminated, ending with the last driver or drivers remaining. When multiple drivers are eliminated on the same lap, their names should be listed alphabetically. Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(laps.length * laps[0].length) will fit within the execution time limit. Input Format array.array.string laps An array of string arrays of driver\'s name and lap time. It is guaranteed that the same drivers will appear in every lap. All laps[i] are guara