Opening your workspace…
Workspace/Coding room
Opening your workspace…
At the beetles' supper club every guest brings a ticket bearing one digit. The cook calls the nines first, then the eights, all the way down to the zeros, who get the crunchy bit at the bottom. Given the tickets as a string of digits, return the serving order as a string. Every ticket gets supper, including every zero.
"20702"OUTPUT"72200"Seven gets a bowl, then both twos, then both zeros.
"000"OUTPUT"000"Three guests still need three bowls.
There are only ten possible ticket numbers, even on a busy night.
/** @param {string} tickets * @returns {string} */ function solve(tickets) { // Write your answer here. }
Tab inserts two spaces. Shift+Tab outdents. Use the arrow keys and Tab to choose a suggestion. Press Escape, then Tab, to leave the editor. Press Control or Command with apostrophe to run samples or with Enter to submit.
"20702""72200"