← Questions

Top k lottery winners by spending

0
AmazonCodingLast asked Jan 2026

Given lottery entries that record who bought tickets and how much they spent, return the top k people ranked by total spending. Discuss ties and how you would keep the answer current as new purchases arrive.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding