Also reported as Random Pick with Weight (LeetCode 528)
Amazon coding question, reconstructed from 4 candidate reports (January 2026 to August 2026). Tests: binary search. Candidates reported 3 follow-ups. The write-up includes a Python solution that passes 11 test cases.