FastPrepEmployee Salary Report by Group
Problems/Employee Salary Report by Group

Employee Salary Report by Group

Rippling logoRippling● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Our main source is a post from May 8, 2022 (Bangalore). Its screening round, labeled as low-level design, used employee records. It began with salary totals per department and also covered filters and grouping on any field with a summary such as a minimum or a mean. Two senior-engineer reviews match only loosely and neither mentions employees. The August 18, 2021 one names simple arithmetic on JSON input and nothing more. The March 31, 2021 one asks for averages, maxima and minima over fields in a JSON list.

Beyond department and salary, no report names record fields, and none gives an input layout, a rounding rule or an output format. The class and method design that a low-level design round looks at is not tested here. Here the input is arrays instead of JSON: each employee is a department, a city and a title plus a whole-number salary. You group by one of those three fields. The summary is sum, min, max, count or avg, with avg rounded down. Every filter must match exactly, case included. The answer lists group:value strings sorted by group name in character-code order, and is empty when no one passes. The limits and examples are our own.

Our version is about 60% the same as the reported questions.

You are building a small salary report. Employee i is employees[i] = [department, city, title] and earns salaries[i].

First apply the filters. Each filters[j] = [field, value] keeps only employees whose field equals value exactly (case matters). An employee stays in the report only if they pass every filter. With no filters, everyone stays.

Then put the remaining employees into groups by the field named groupBy, and compute aggregate over each group's salaries: "sum" (total), "min" (smallest), "max" (largest), "count" (number of employees) or "avg" (the total divided by the count, rounded down to a whole number).

Return one string "group:value" per group, for example "Eng:371", sorted by group name in character-code order (so uppercase letters come before lowercase ones). If no employee passes the filters, return an empty list.

Function

salaryReport(employees: String[][], salaries: int[], groupBy: String, aggregate: String, filters: String[][]) → String[]

Examples

Example 1

employees = [["Sales","Austin","Rep"],["Eng","Austin","Dev"],["Sales","Boston","Lead"],["Eng","Boston","Dev"],["Eng","Austin","Lead"]]salaries = [50,120,90,100,151]groupBy = "department"aggregate = "sum"filters = []return = ["Eng:371","Sales:140"]

No filters, so everyone counts. Eng has 120 + 100 + 151 = 371 and Sales has 50 + 90 = 140. Eng comes before Sales.

Example 2

employees = [["Sales","Austin","Rep"],["Eng","Austin","Dev"],["Sales","Boston","Lead"],["Eng","Boston","Dev"],["Eng","Austin","Lead"]]salaries = [50,120,90,100,151]groupBy = "city"aggregate = "avg"filters = [["department","Eng"]]return = ["Austin:135","Boston:100"]

Only the three Eng employees pass the filter. Austin has 120 and 151, an average of 135.5, rounded down to 135. Boston has only 100.

Example 3

employees = [["Sales","Austin","Rep"],["Eng","Austin","Dev"],["Sales","Boston","Lead"],["Eng","Boston","Dev"],["Eng","Austin","Lead"]]salaries = [50,120,90,100,151]groupBy = "title"aggregate = "min"filters = [["city","Boston"]]return = ["Dev:100","Lead:90"]

Only the two Boston employees pass. The Dev group has 100 and the Lead group has 90, so each group's minimum is that one salary.

Constraints

  • 1 <= employees.length <= 1000 and salaries.length == employees.length
  • employees[i].length == 3, and every department, city, title and filter value has 1 to 10 English letters.
  • 1 <= salaries[i] <= 10^6
  • groupBy and every filters[j][0] is one of "department", "city" or "title".
  • aggregate is one of "sum", "min", "max", "avg" or "count".
  • 0 <= filters.length <= 3 and filters[j].length == 2

More Rippling Phone Screen questions

  • Filter, Sort, and Deduplicate Scheduled TasksPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Stateful Log Transform and SearchPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Dependency-Aware Task SchedulerPHONE SCREEN · Seen Nov 2026
  • Delivery Cost Tracker with Effective-Dated RatesPHONE SCREEN · Seen Nov 2026
  • Camel CardsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Best and Worst Camel Card CompletionsPHONE SCREEN · Seen Nov 2026
  • Corporate Card Expense RulesOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • In-Memory Priority Task SchedulerPHONE SCREEN · Seen Oct 2026
  • Limit an Organization Tree's HeightPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Median Across N Sorted ArraysPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Group AnagramsWorkday · PHONE SCREEN
  • Group AnagramsEPAM · PHONE SCREENEPAM interview questions
  • Find Duplicate File GroupsAnthropic · PHONE SCREENAnthropic interview questions
  • Insert an Employee into an Organization HierarchyWaymo · PHONE SCREENWaymo interview questions
  • Group AnagramsMotive · PHONE SCREEN · ONSITE INTERVIEWMotive interview questions
  • Stable Top K Frequent WordsGoogle · PHONE SCREEN · ONSITE INTERVIEWGoogle interview questions
  • Group AnagramsBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Find Duplicate Image FilesAbnormal Security · PHONE SCREEN
  • Credit Card Command ProcessorChime · PHONE SCREEN
  • Shared Courses for Every Pair of StudentsCrunchyroll · PHONE SCREENCrunchyroll interview questions

Interview reports that mention this question

  • Rippling No-Level Older Reports: 31 Experiences (Part 6 of 6)
  • Rippling Older SWE Interviews: 11 Experiences (Part 11 of 12)

Rippling interview experiences

  • Rippling No-Level Onsite Loops: 24 Experiences (Part 5 of 6)
  • Rippling No-Level Screens and Loops: 18 Experiences (Part 4 of 6)
  • Rippling No-Level Coding Screens: 37 Experiences (Part 3 of 6)
  • Rippling No-Level Design, Screens: 30 Experiences (Part 2 of 6)
All Rippling interview questionsSee Rippling hiring insights
Saved
class Solution {
    public String[] salaryReport(String[][] employees, int[] salaries, String groupBy, String aggregate, String[][] filters) {
        // Write your code here.
    }
}
Checking account…