Boost a copy of the queue
First connect the display steps in policy order: strip the leading The before shortening and adding brackets. Then show the top two requests by votes while retaining the arrival queue for refresh. Finally preview a one-vote promotion for every request without recording those votes in the queue.
What needs to change
Repair boosted so the bonus round leaves the queue’s votes as they were.
Reproduce
- The starter does not compile; read the diagnostic before changing the code.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, read_lines, the Request struct, parse and the complete main.
Input: up to 50 song votes records, one per line, with ordinary spaces or tabs between fields. Song names are opaque non-whitespace UTF-8 tokens, including numeric-looking names. Votes are decimal nonnegative whole counts from 0 to 1000, including leading-zero spellings. An empty input has no requests; a request with zero votes is still present. The supplied readers receive valid data and do not validate these bounds.