FastPrepSchedule Multiple Software Timers
Problems/Schedule Multiple Software Timers

Schedule Multiple Software Timers

Google logoGoogle● HardFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The interview report gives the task of one hardware timer serving many software timers. We added a finite trace of requests, how rescheduling works, a fixed order for ties, and limits on timestamps. Our version is about 82% the same as the reported question.

A device has one hardware timer but must support many logical software timers. Each request is [issuedAt, timerId, relativeTimeout] and schedules that timer to fire at issuedAt + relativeTimeout.

Scheduling an active timerId replaces its prior deadline. Before handling the first request at a timestamp, fire every timer whose deadline is at or before that timestamp. After all requests, fire every remaining timer. Return [fireTime, timerId] rows ordered by fire time and then timer ID.

Function

fireSoftwareTimers(requests: int[][]) → int[][]

Examples

Example 1

requests = [[0,1,5],[1,2,2],[4,1,3]]return = [[3,2],[7,1]]

Timer 2 fires at 3. Rescheduling timer 1 at time 4 invalidates its old deadline and moves it to 7.

Example 2

requests = [[0,2,4],[0,1,4],[4,3,1]]return = [[4,1],[4,2],[5,3]]

Both due timers fire before the time-4 request, with the smaller timer ID first.

Constraints

  • 1 <= requests.length <= 100000
  • Every request has exactly three integers.
  • 0 <= issuedAt <= 1000000000
  • 1 <= timerId <= 1000000000
  • 1 <= relativeTimeout <= 1000000000
  • Request timestamps are nondecreasing, and every resulting fire time is at most 2000000000.

More Google Onsite Interview questions

  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Distinct Subset SumsONSITE INTERVIEW · Seen Nov 2026
  • Playlist With No Same Artist in a RowONSITE INTERVIEW · Seen Nov 2026
  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Delete Nodes and Return Forest RootsONSITE INTERVIEW · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • First and Last Target Position in a Mountain ArrayONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • 0/1 Knapsack with Weight and Volume LimitsONSITE INTERVIEW · Seen Nov 2026
  • Batched Subsequence Word MatchesONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • 15-Minute Chat Session TrackerOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • LRU Cache with TTLAutodesk · ONSITE INTERVIEWAutodesk interview questions
  • Score-Rotating Movie PlaylistNetflix · ONSITE INTERVIEWNetflix interview questions
  • Tiered Expiring Item StoreHudson River Trading · PHONE SCREEN · ONSITE INTERVIEWHudson River Trading interview questions
  • Expiring Key SetAmazon · ONSITE INTERVIEW
  • Design Authentication ManagerOracle · ONSITE INTERVIEWOracle interview questions
  • Delayed Job SchedulerWalmart Labs · ONSITE INTERVIEW
  • Thread-Safe Task Storage and Worker DispatchNuro · ONSITE INTERVIEWNuro interview questions
  • Notification Deduplication WindowGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Helpdesk Ticket ProcessingThe Walt Disney Company · ONSITE INTERVIEWThe Walt Disney Company interview questions

Interview reports that mention this question

  • Google Software Engineer Onsite Questions: 10 Experiences

Google interview experiences

  • Google L5 Security Engineer Domain Knowledge Round: 1 Experience
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
  • Google Experienced SWE First Round and Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public int[][] fireSoftwareTimers(int[][] requests) {
        // Write your code here.
    }
}
Checking account…