InterviewStack.io LogoInterviewStack.io

Validation and Edge Case Handling Questions

Focuses on validating the correctness and robustness of software systems and the data that flows through them, and on identifying and handling boundary conditions before they cause silent failures. Covers input validation and sanitization on both client and server side, schema and type checks, and null or missing value handling. Includes duplicate detection and off-by-one or boundary testing such as pagination limits, date range filters, and value range checks. Also covers validation in data-processing contexts: guarding aggregations and joins against duplicate rows or cartesian-product results, and time zone or DST-aware date range checks. Emphasizes designing code, APIs, and queries that fail safely, produce meaningful errors instead of silent corruption, and are covered by targeted tests for edge cases (malformed input, empty collections, concurrent access, unexpected data shapes).

EasyTechnical
90 practiced
Write a Python function using pandas that takes a DataFrame and a schema dict mapping column names to expected dtypes (e.g., {'id':'int64','amount':'float64','ts':'datetime64[ns]'}). The function should return rows where types don't match and attempt safe coercions (parse datetimes, convert numeric strings). Describe behavior on coercion failures and nulls.
MediumTechnical
77 practiced
Define a small set of operational data quality KPIs for production datasets: completeness, accuracy, timeliness (freshness), and consistency. For each KPI propose a measurement method (SQL or metric), a suggested threshold for alerting, and a practical remediation action when thresholds are breached.
HardSystem Design
71 practiced
Design a safe backfill system for batch feature computation that supports partial reruns, is idempotent, and protects downstream models from duplicate updates. Include job checkpoints, transactional writes, validation checks before commit (row counts, checksums), and an approach to test backfills in staging before production promotion.
HardTechnical
96 practiced
Design an experiment to quantify how often labels are late (label delay) and the impact on model training/monitoring. Describe how to instrument label arrival timestamps, measure label completeness over time windows, and incorporate label delay awareness into training and alerting.
HardTechnical
92 practiced
Discuss tradeoffs between strict schema enforcement (e.g., Avro/Protobuf with enforced types and compatibility) versus schema-on-read flexibility in a large organization. Consider developer velocity, data quality, backward compatibility, and testing burden. Recommend an approach with guardrails for a company ingesting many third-party feeds.

Unlock Full Question Bank

Get access to hundreds of Validation and Edge Case Handling interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.