Eliminate Drivers by Slowest Personal Best
Updated
Problem statement
Each lap contains one name:time report for every active driver. Maintain each driver's minimum time seen.
After each lap, eliminate all active drivers tied for the highest personal-best time, appending tied names alphabetically. Return elimination order, ending with any last remaining drivers alphabetically.
Function
eliminateDrivers(laps: String[][]) → String[]Examples
Example 1
laps = [["a:10","b:12","c:11"],["a:9","c:10"]]return = ["b","c","a"]b is slowest after lap one, c after lap two, leaving a.
Example 2
laps = [["b:10","a:10"]]return = ["a","b"]The tied final drivers are alphabetical.
Constraints
1 <= laps.length <= 1000- Times are positive integers.
More ZipRecruiter Online Assessment questions
- Four-Level Banking System with Scheduled PaymentsOA · Seen Oct 2026
- Count Three-Digit Numbers with Distinct DigitsOA · Seen Oct 2024
- Longest Frequency-Bounded SubarrayOA · Seen Oct 2024
- Minimum Changes to Draw a YOA · Seen Oct 2024
- Apply Binary State OperationsOA · Seen Sep 2024
- Simulate Orchard Rot SpreadOA · Seen Sep 2024
- Compare Odd- and Even-Index SumsOA · Seen Sep 2024
- Coordinate Removals with Column GravityOA · Seen Sep 2024
- Lexicographically Smallest End ReversalOA · Seen Sep 2024
- Recursively Expanded Shell Command CountsOA · Seen Sep 2024
Similar questions at other companies
- Subscription and Usage-Based Billing CalculatorStripe · OAStripe interview questions
- Build Sessions from Unordered Events (Part 1)Scale AI · OAScale AI interview questions
- Temporal Key-Field Database with Prefix ScansThe Trade Desk · OA
- HTTP Request RedirectionAmazon · OA
- Aggregate Paginated Project Run RecordsReplit · OA
- Determine the Elimination Order (MLE)Quora · OAQuora interview questions
- Document and Layer OperationsFigma · OAFigma interview questions
- In-Memory File SystemAirbnb · OAAirbnb interview questions
- Power Cell BankOptiver · OAOptiver interview questions
- Blood Type Inheritance: Possible Parent GenotypesAbridge · OAAbridge interview questions