FastPrepFuture-Effective Employee Salary
Problems/Future-Effective Employee Salary

Future-Effective Employee Salary

Rippling logoRippling● MediumFULLTIMEONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Rippling onsite interview. The report gives the ability to set a salary that takes effect in the future. It does not give the operation interface, the rules for queries, or the tie rule between versions. Our version is about 86% the same as the reported question.

Simulate an effective-dated employee salary API over a finite ordered sequence of operations. Operation i uses operations[i], employeeIds[i], requestTimes[i], effectiveTimes[i], and salaryValues[i]. Request times are nondecreasing.

Operations

  • ADD: add a new employee with salary salaryValues[i] effective at requestTimes[i]. For this operation, effectiveTimes[i] equals requestTimes[i]. Return -1.
  • SCHEDULE: register salary salaryValues[i] for an existing employee at the future time effectiveTimes[i], where effectiveTimes[i] > requestTimes[i]. Return -1.
  • GET: query the employee's salary at effectiveTimes[i]. Ignore salaryValues[i]. Among versions submitted by earlier operations, return the salary with the greatest effective timestamp not after the query timestamp.

If a later SCHEDULE uses the same employee and effective timestamp as an earlier one, the later value replaces the earlier value for subsequent operations. A GET for an unknown employee, or for a time before that employee's first effective salary, returns -1.

Return one integer for every operation, in input order.

Function

applySalaryOperations(operations: String[], employeeIds: String[], requestTimes: int[], effectiveTimes: int[], salaryValues: int[]) → int[]

Examples

Example 1

operations = ["ADD","SCHEDULE","GET","GET","GET"]employeeIds = ["e1","e1","e1","e1","e1"]requestTimes = [1,2,3,3,3]effectiveTimes = [1,10,5,10,12]salaryValues = [100,150,0,0,0]return = [-1,-1,100,150,150]

The salary is 100 before time 10 and 150 from time 10 onward.

Example 2

operations = ["ADD","SCHEDULE","SCHEDULE","GET"]employeeIds = ["e","e","e","e"]requestTimes = [1,2,3,4]effectiveTimes = [1,10,10,10]salaryValues = [80,100,120,0]return = [-1,-1,-1,120]

The second schedule replaces the first version at effective time 10, so the query returns 120.

Constraints

  • 1 <= operations.length <= 200000.
  • All five input arrays have the same length.
  • Each operation is ADD, SCHEDULE, or GET.
  • 0 <= requestTimes[i], effectiveTimes[i] <= 10^9, and request times are nondecreasing.
  • Every ADD uses a unique nonempty employee ID and has effectiveTimes[i] == requestTimes[i].
  • Every SCHEDULE names an existing employee and has effectiveTimes[i] > requestTimes[i].
  • 1 <= salaryValues[i] <= 10^9 for ADD and SCHEDULE.

More Rippling Onsite Interview questions

  • Filter, Sort, and Deduplicate Scheduled TasksPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Stateful Log Transform and SearchPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Camel CardsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Corporate Card Expense RulesOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Limit an Organization Tree's HeightPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Delivery Cost TrackerPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Maximum Currency Conversion Along a Simple PathPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Top K Frequent WordsPHONE SCREEN · ONSITE INTERVIEW · Seen Aug 2026
  • Filter and Sort Scheduled TasksONSITE INTERVIEW · Seen Jul 2026
  • LFU Cache with LRU Tie-BreakingPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026

Similar questions at other companies

  • Bank Accounts with Balance HistoryMeta · OAMeta interview questions
  • Versioned ArrayTrueFoundry · PHONE SCREEN
  • Random Dasher Set OperationsDoorDash · ONSITE INTERVIEWDoorDash interview questions
  • Time-Based Key-Value StoreOracle · PHONE SCREEN · ONSITE INTERVIEWOracle interview questions
  • Time-Based Key-Value StoreCockroach Labs · PHONE SCREEN · ONSITE INTERVIEW
  • Escape Room LeaderboardPinterest · PHONE SCREEN · ONSITE INTERVIEWPinterest interview questions
  • Time-Indexed Key-Value StoreTogether AI · ONSITE INTERVIEW
  • Insert, Delete, And Get Random In Constant TimeAmazon · ONSITE INTERVIEW
  • Insert, Delete, And Get Random In Constant TimeGoldman Sachs · ONSITE INTERVIEWGoldman Sachs interview questions
  • Globally Versioned Key-Value StoreLyft · ONSITE INTERVIEWLyft interview questions

Rippling interview experiences

  • Rippling Senior SWE Full Loop Questions: 1 Experience
  • Rippling Experienced SWE Phone Screens: 2 Experiences
  • Rippling Design Rounds and Onsites: 17 Experiences (Part 3 of 3)
  • Rippling Phone Coding Screens: 14 Experiences (Part 2 of 3)
  • Rippling SWE Screens and Loops: 31 Experiences (Part 1 of 3)
  • Rippling No-Level Older Reports: 31 Experiences (Part 6 of 6)
All Rippling interview questionsSee Rippling hiring insights
Saved
class Solution {
    public int[] applySalaryOperations(String[] operations, String[] employeeIds, int[] requestTimes, int[] effectiveTimes, int[] salaryValues) {
        // Write your code here.
    }
}
Checking account…