Quantify database bug cost/benefit
Capital OneData Scientist · Technical ScreenLast updated
This question evaluates a candidate's ability to perform cohort-based financial impact analysis and basic statistical arithmetic to quantify revenue and cost deltas caused by registration-state errors.
From January 1 to March 31 (3 months), a registration bug affects Premium users. A Premium user must be registered to be recognized for a 2% commission; unregistered users are treated as 1% commission; the $1.25/month admin cost applies only when registered. Due to the bug: (i) Premium users who cancel remain registered, and (ii) new Premium users are not registered. Each month, 400 Premium users cancel and 2,000 new Premium users join. Assume average spending: Premium $625/month; Regular $500/month. Commission is company revenue; admin is a company cost. Cohorts persist until fix on April 1 (e.g., January’s cancelers remain registered for Jan–Mar; February’s for Feb–Mar; etc.). Compute the net profit impact over the 3 months versus correct functioning, itemizing revenue and cost deltas for each cohort and giving the total dollar impact.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.