Skip to content
← Back to the archive

8 September 2026 · Advanced track

Least Downtime Server

Advanced Dictionaries Records

Find the server with the lowest total downtime, breaking ties toward the most recently introduced server.

A hosting provider logs maintenance events across its server fleet. You are given a list of events, each naming the server and how many minutes it was down for, in the order the events happened. Add up the downtime minutes for each server. Return the server with the lowest total downtime. If two or more servers are tied for the lowest total, return whichever of them was introduced most recently in the log.

Constraints

  • events has between 1 and 1000 entries
  • each server name has between 1 and 30 characters
  • minutes is a whole number between 0 and 1000

Function signature

def lowest_downtime_server(events):

Sign in to solve this bracket

Reading the problem is free for everyone. Opening the editor and solving it requires an account with Open Bracket+.