FastPrepGroup Training Overdue Rollup
Problems/Group Training Overdue Rollup

Group Training Overdue Rollup

Vanta logoVanta● HardFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report describes group rollups over direct and indirect members. It leaves out how duplicate members are handled, what happens when the hierarchy has a cycle, where the overdue-day boundary falls, the rules for valid input, resource limits, and a function you can run. Our version is about 78% the same as the reported question.

Every employee has one required training due day and either a completion day or -1 when the training has not been completed. Groups form a directed acyclic hierarchy: a group contains its direct employees and every employee contained by any direct or indirect subgroup.

For every group in groupNames, return two values:

  1. the number of distinct employees in that group's complete membership; and
  2. the sum of their overdue days on checkDay.

An employee contributes overdue days only when the employee has not completed by checkDay. In that case, the contribution is max(0, checkDay - dueDay). The due day itself contributes 0. A completion day after checkDay is a future event and does not prevent an overdue contribution.

An employee reachable through multiple subgroup paths is counted once per group. Return rows in the same order as groupNames, with each row formatted as [distinctEmployeeCount, totalOverdueDays].

Function

groupOverdueRollup(employeeIds: String[], dueDays: int[], completionDays: int[], groupNames: String[], directEmployees: String[][], directSubgroups: String[][], checkDay: int) → int[][]

Examples

Example 1

employeeIds = ["amy","ben","cy"]dueDays = [5,7,4]completionDays = [-1,8,6]groupNames = ["eng","platform","security"]directEmployees = [["amy"],["ben"],["cy"]]directSubgroups = [["platform","security"],[],[]]checkDay = 10return = [[3,5],[1,0],[1,0]]

eng contains all three employees. Only amy is incomplete on day 10, contributing 10 - 5 = 5 overdue days. The other employees completed by the check day.

Example 2

employeeIds = ["a","b"]dueDays = [2,3]completionDays = [-1,-1]groupNames = ["root","left","right","shared"]directEmployees = [[],[],[],["a","b"]]directSubgroups = [["left","right"],["shared"],["shared"],[]]checkDay = 5return = [[2,5],[2,5],[2,5],[2,5]]

The shared subgroup is reachable from root through two paths, but its two employees are counted once. Their overdue contributions are 3 and 2.

Constraints

  • 1 <= employeeIds.length == dueDays.length == completionDays.length <= 2000.
  • Employee IDs are unique non-empty strings.
  • 0 <= dueDays[i], checkDay <= 10^6.
  • completionDays[i] == -1 or 0 <= completionDays[i] <= 10^6.
  • 1 <= groupNames.length == directEmployees.length == directSubgroups.length <= 1000.
  • Group names are unique non-empty strings.
  • Every direct employee and subgroup name is known. Names are unique inside each direct-membership row.
  • The subgroup relation is a directed acyclic graph.
  • Every returned overdue-day total fits in a signed 32-bit integer.

More Vanta interview questions

  • Task Build Order and File-Change RerunsPHONE SCREEN · Seen Nov 2026
  • Employee Training StatusPHONE SCREEN · Seen Aug 2026
  • Implement uniq: Unique LinesONSITE INTERVIEW · Seen Sep 2026

Similar questions at other companies

  • Evolving Merchant Clusters and Persistent PinsStripe · OAStripe interview questions
  • Spreadsheet With Dependent CellsCharacter.AI · PHONE SCREEN
  • Evaluate Live Spreadsheet ExpressionsStrala · PHONE SCREEN
  • Concurrent Web Crawler SimulationOpenAI · PHONE SCREEN · ONSITE INTERVIEWOpenAI interview questions
  • Resolve Variable Equations with Dependency ErrorsApplied Intuition · PHONE SCREENApplied Intuition interview questions
  • Nested Substitutions with Cycle DetectionKikoff · PHONE SCREENKikoff interview questions
  • Corporation Reporting LinesMicrosoft · PHONE SCREENMicrosoft interview questions
  • Validate and Resolve Evaluation ChainsPlaid · PHONE SCREEN · ONSITE INTERVIEWPlaid interview questions
  • Detect a Deadlock from Lock LogsHelm.ai · PHONE SCREEN
  • Route Graph Reachability with a Broken LinkFigma · PHONE SCREENFigma interview questions

Vanta interview experiences

  • Vanta SWE Phone Screen: Task Order and Reruns: 1 Experience
See Vanta hiring insights
Saved
class Solution {
    public int[][] groupOverdueRollup(String[] employeeIds, int[] dueDays, int[] completionDays, String[] groupNames, String[][] directEmployees, String[][] directSubgroups, int checkDay) {
        // write your code here
    }
}
Checking account…