Validate Unit-Test Coverage and Identify Missing Scenarios
Quick Overview
This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Validate Unit-Test Coverage and Identify Missing Scenarios states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.
Validate Unit-Test Coverage and Identify Missing Scenarios
Company: Capital One
Role: Data Scientist
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Onsite
##### Scenario
Tech round: reviewing an existing unit-test that exercises the class from Part 2
##### Question
i) What does the current unit-test validate?
ii) List additional scenarios you would test and justify each.
iii) Choose the most critical missing scenario and write the corresponding test code.
##### Hints
Cover null inputs, mismatched dimensions, deterministic output, and exception handling; use pytest assertions.
Overview: This interview question evaluates algorithm design, data structures, correctness, complexity, edge cases, and implementation details in a realistic interview setting. A strong answer for Validate Unit-Test Coverage and Identify Missing Scenarios states assumptions, handles edge cases, explains trade-offs, and shows how to validate the result clearly.