Vanta

Vanta Software Engineer Interview Questions

5+ questions from real Vanta Software Engineer interviews, reported by candidates.

5
Questions
3
Round Types
3
Topic Areas
2025
Year Range

Round Types

Phone 3 Onsite 1 Coding 1

Top Topics

Questions

from typing import List class Task: def __init__(self, id: str, deps: List[str]): self.id = id self.deps = deps """ web:deploy-------------------------------- | v web:test | web-client:test | v web:bu

## Problem Design a task scheduling system that supports: adding tasks with a priority (higher number = higher priority), popping the highest-priority task, and querying the count of pending tasks. The system must be safe for concurrent access from multiple threads. ```python import threading class TaskList: def __init__(self): ... def add_task(self, task_id: str, priority: int) -> None: ... def pop_task(self) -> str | None: ... # Returns task_id or None if empty def pending_count(self) -> int: ... ``` **Example:** ``` tl = TaskList() tl.add_task("A", priority=5) tl.add_task("B", priority=10) tl.add_task("C", priority=1) tl.pop_task() -> "B" tl.pop_task() -> "A" tl.pending_count() -> 1 ``` ## Follow-ups 1. What synchronization primitive do you use to protect the heap, and why is a lock sufficient here vs. a condition variable? 2. How would you implement `pop_task` as a blocking call that waits until a task is available? 3. What happens if two tasks have the same priority? How do you ensure FIFO ordering among them? 4. How would you add a `cancel_task(task_id)` operation efficiently without rebuilding the heap?

## Problem Implement a `TrainingStatus` class that tracks an ML training job's progress across epochs. It should record loss and accuracy per epoch, estimate time remaining (ETA) based on elapsed time, and detect if training has stalled (no improvement in loss for `patience` epochs). ```python import time class TrainingStatus: def __init__(self, total_epochs: int, patience: int = 5): ... def record_epoch(self, epoch: int, loss: float, accuracy: float) -> None: ... def eta_seconds(self) -> float: ... def is_stalled(self) -> bool: ... def best_epoch(self) -> int: ... ``` **Example:** ``` ts = TrainingStatus(total_epochs=100, patience=3) ts.record_epoch(1, loss=0.9, accuracy=0.6) ts.record_epoch(2, loss=0.8, accuracy=0.65) ts.record_epoch(3, loss=0.82, accuracy=0.64) ts.record_epoch(4, loss=0.83, accuracy=0.63) ts.is_stalled() -> True # loss hasn't improved for 3 epochs ts.best_epoch() -> 2 ``` ## Follow-ups 1. How would you compute a smoothed ETA using an exponential moving average of per-epoch durations instead of a simple average? 2. What changes if you want to track multiple metrics (e.g., val_loss vs. train_loss) and stall is defined on val_loss only? 3. How would you serialize the training status to disk so a crashed job can resume? 4. What is the difference between early stopping based on patience and a learning rate schedule with warmup/decay?

## Problem Given a sequence of lines (strings) from a large file or stream, return all lines that appear exactly once, in the order of their first occurrence. ```python def unique_lines(lines: list[str]) -> list[str]: pass ``` **Example:** ``` lines = ["apple", "banana", "apple", "cherry", "banana", "date"] -> ["cherry", "date"] lines = ["a", "b", "c"] -> ["a", "b", "c"] lines = ["x", "x", "x"] -> [] ``` ## Follow-ups 1. What is the time and space complexity of your approach? Can you do it in a single pass? 2. If the file is too large to fit in memory, what external algorithm or data structure would you use (e.g., external sort, counting Bloom filter)? 3. How does case sensitivity affect your solution, and how would you add a case-insensitive mode? 4. How would you modify the solution to also return lines that appear exactly `k` times for arbitrary `k`?

## Problem Map words between two sets according to a bijective or pattern-based mapping rule. ## Likely LeetCode equivalent Similar to LC 290 Word Pattern. ## Tags coding, hash_table, strings, phone

See All 5 Vanta Software Engineer Questions

Full question text, answer context, and frequency data for subscribers.

Get Access