Code Room
CodingEasycod-g1360
Subject Ab test mathLevel Entry–Mid~10 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

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.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.