← Vanta Interview Insights

Vanta·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Vanta software engineer interview with a security training tracking problem. Pretty focused on getting the status logic right, not just the math.

Questions Asked (1)

Q1

Given a training start day, the number of days needed to complete a security training, and a target evaluation day, write a function that determines whether the employee finished by the target day and, if not, how many days overdue they are. The function should return explicit status labels like 'not started', 'in progress', 'completed', or 'overdue'.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I jumped straight into the overdue calculation and nearly forgot to handle the 'not started' case where the target day is before the training even begins.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the input format and edge cases (e.g., start day after target day, zero training days). Then design a function that computes the completion day as start_day + training_days - 1, compares it to the target day, and returns the appropriate status label and overdue days if applicable. Walk through examples to verify correctness and discuss trade-offs like date handling and status precedence.

Pro tip: Mention that you would use a date library or epoch days to avoid off-by-one errors, and explicitly handle the case where the start day is after the target day (return 'not started' with 0 overdue). Also, clarify whether training days are inclusive of the start day.

1. Clarify requirements and edge cases

Ask about input types (dates as strings, integers, or date objects), whether training days include the start day, and how to handle invalid inputs. Confirm the exact status labels and their precedence.

2. Define the logic for each status

Determine conditions: if target < start, return 'not started'; if target < start + training_days - 1, return 'in progress'; if target >= start + training_days - 1, return 'completed' (or 'overdue' if target > completion day). Compute overdue days as target - completion day.

3. Implement the function with clear variable names

Write code that calculates completion_day = start_day + training_days - 1, then uses if-else to return the status and overdue days. Use date arithmetic carefully, e.g., convert dates to epoch days.

4. Test with representative cases

Run through examples: target before start, target during training, target on completion day, target after completion day. Verify outputs match expected statuses and overdue counts.

5. Discuss trade-offs and extensions

Talk about handling time zones, weekends/holidays, or changing training days. Mention how you would structure the code for readability and testability.

Key Points to Mention

  • Off-by-one errors: ensure completion day is start_day + training_days - 1 if start day counts as day 1.
  • Status precedence: 'not started' should be checked before 'in progress' or 'completed'.
  • Date arithmetic: use epoch days or a date library to avoid manual month/year calculations.
  • Edge cases: start day after target day, zero training days, negative overdue days.
  • Return format: explicit status labels and overdue days only when overdue.
  • Testability: suggest unit tests for boundary conditions.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.