Code RoomConversion rate basis points
EasyPrep Room Coding #551

Conversion rate basis points

CodingAlgorithms & data structuresEntry–Mid~10 min

A growth experiment dashboard shows each variant's conversion rate in basis points (hundredths of a percent) to avoid float noise. Given equal-length lists conversions and visitors, where variant i had conversions[i] sign-ups from visitors[i] visitors, return a list where entry i is floor(10000 * conversions[i] / visitors[i]). If a variant has zero visitors, use -1 for that entry. Example: conversions = [30, 45], visitors = [1000, 1200] gives [300, 375].

Implement
conversion_bps(conversions: list[int], visitors: list[int]) → list[int]
Examples
in[[30,45],[1000,1200]]out[300,375]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

0:00 of about 10 min
InputExpectedGot
[[30,45],[1000,1200]][300,375]not run yetsample