FastPrepThrottled Call Times
Problems/Throttled Call Times

Throttled Call Times

Adobe logoAdobe● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: You simulate a throttled function. Calls come in at given times. A call runs only when at least wait time units have passed since the latest run, and every other call is dropped. An Adobe MTS 2 report (August 2024) lists, as the third question of its first round, how to deal with events that fire again and again while a page is scrolled or the browser window changes size. The answer it records is throttling, coded first in a simple way and then with timestamps. It gives no function signature, timing rules or tests.

We made it a timing exercise that every language can run. We chose these rules. Calls arrive as sorted times with values. A run happens at the moment of the call that starts it. A dropped call never runs later, so there is no trailing run. A call exactly wait units after the latest run is allowed. There are at most 1000 calls, times up to 10^6, and wait from 1 to 10^6. We wrote new examples. The editorial also describes both JavaScript versions.

Our version is about 55% the same as the reported question.

A throttled function does its work at most once in any stretch of wait time units, however often it is called. Calls that come too soon after the last run are simply dropped.

Call i happens at time times[i] with value values[i]. The rules:

  • A call runs immediately, at its own time and with its own value, if nothing has run yet or if at least wait time units have passed since the latest run (times[i] - lastRun >= wait).
  • Any other call is dropped. A dropped call is never run later.
  • Calls at the same time are handled in the order they are given.

Return every run as a pair [run time, value], in time order.

Function

throttledRuns(times: int[], values: int[], wait: int) → int[][]

Examples

Example 1

times = [0,2,3,5,9,10,14]values = [1,2,3,4,5,6,7]wait = 4return = [[0,1],[5,4],[9,5],[14,7]]

The call at 0 runs. Calls at 2 and 3 are less than 4 after it and are dropped. The call at 5 runs (5 after the last run), and so does the call at 9, exactly 4 after 5. The call at 10 is dropped and the call at 14 runs.

Example 2

times = [3,3,3]values = [8,9,10]wait = 1return = [[3,8]]

The first call at time 3 runs. The other two arrive 0 time units after that run, which is less than 1, so they are dropped.

Example 3

times = [1,100]values = [5,6]wait = 50return = [[1,5],[100,6]]

The calls are 99 apart, more than 50, so both run.

Constraints

  • 1 <= times.length <= 1000 and values.length == times.length
  • 0 <= times[i] <= 10^6, and times is sorted in non-decreasing order
  • 0 <= values[i] <= 10^4
  • 1 <= wait <= 10^6

More Adobe Phone Screen questions

  • Evaluate a Parenthesized Integer ExpressionPHONE SCREEN · Seen Oct 2026
  • All Elements of Two BSTs in OrderPHONE SCREEN · Seen Aug 2026
  • Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
  • Binary Tree Level-Order Traversal by LevelsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Count Occurrences in a Sorted ArrayPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Count Pairs with Absolute Difference KPHONE SCREEN · Seen Jul 2026
  • Count Subsets with Sum KPHONE SCREEN · Seen Jul 2026
  • Numbers with Exactly Three DivisorsPHONE SCREEN · Seen Jul 2026
  • Sum of Even Nodes on a Path in a Numbered Binary TreePHONE SCREEN · Seen Jul 2026
  • Largest Value in Every Sliding WindowPHONE SCREEN · Seen Jul 2026

Similar questions at other companies

  • Automation Pipeline, Part 1: Single WorkerPlaid · PHONE SCREENPlaid interview questions
  • Search and Format ContactsAdyen · PHONE SCREENAdyen interview questions
  • Array-Backed Set Without Library CollectionsOde with Anthropic · PHONE SCREEN
  • Paginate Retained Conversation HistorySierra · PHONE SCREENSierra interview questions
  • Validate a Chess Bishop, Rook, or Queen MoveGlean · PHONE SCREENGlean interview questions
  • Count Distinct Underwriting PII ValuesAffirm · PHONE SCREEN · ONSITE INTERVIEWAffirm interview questions
  • Apply Affine Array TransformationsByteDance · PHONE SCREENByteDance interview questions
  • Match a Variadic Function SignatureConfluent · PHONE SCREENConfluent interview questions
  • Bounded IPv4 FilterAmazon · PHONE SCREEN
  • Partition and Group Values by ParityEPAM · PHONE SCREENEPAM interview questions

Interview reports that mention this question

  • Adobe MTS Interview Questions: 12 Experiences (Part 2 of 6)
  • Adobe Experienced Hire Interviews: 55 Experiences (Part 1 of 6)

Adobe interview experiences

  • Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
  • Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)
  • Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
  • Adobe New Grad MTS Interview Questions: 7 Experiences
All Adobe interview questionsSee Adobe hiring insights
Saved
class Solution {
    public int[][] throttledRuns(int[] times, int[] values, int wait) {
        // Write your code here.
    }
}
Checking account…