BudiBadu Logo
00:00

Atrium Performance Call Sheet

Sorting Algorithms Medium 0 views

The atrium's performance director keeps a fast-moving call sheet where each ensemble signs in with stage@act@priority. The sheet preserves exactly what they wrote—stage nicknames, stylized act titles, and a numeric priority that determines who rehearses first. By the time the sound check starts, the list is a scramble, making it hard to brief lighting or schedule the rotating platforms. The director needs a helper routine that transforms the raw entries into a neatly ordered list ready for broadcast to the crew.

Each returned string must read "priority - stage: act", preserving the original stage and act text. Sorting should use the integer priority segment first, then the stage name alphabetically, and finally the act title using case-insensitive comparison when both earlier keys match. The function may not alter the original list; it should build a fresh sequence while leaving every character in the recorded strings untouched.

Before doors open, coordination compares the helper's output with a master schedule. Anything out of position forces an on-the-fly reshuffle that delays rehearsals and confuses the crew radios. Provide a list that aligns perfectly, including the quiet case where no entries were captured and an empty list tells the director the atrium floor stays dark.

Example 1:

Input: entries = ["StageA@Lantern Waltz@2","StageB@Harbor Hymn@1","StageA@Lantern Waltz@1","StageC@Echo Lines@3"]
Output: ["1 - StageA: Lantern Waltz","1 - StageB: Harbor Hymn","2 - StageA: Lantern Waltz","3 - StageC: Echo Lines"]
Explanation: Priority controls first, with ties broken by stage and then act name.

Example 2:

Input: entries = ["NorthWing@Aurora Bloom@4","Center@ember chorus@4","Center@Ember Chorus@4"]
Output: ["4 - Center: Ember Chorus","4 - Center: ember chorus","4 - NorthWing: Aurora Bloom"]
Explanation: Priorities match, so stages sort alphabetically, and the act titles compare case-insensitively while preserving text.

Example 3:

Input: entries = ["Balcony@Solo Light@6"]
Output: ["6 - Balcony: Solo Light"]
Explanation: A single entry is reformatted without reordering.

Related Problems

No related problems found

Comments (0)

Join the Discussion

Share your thoughts, ask questions, or help others with this problem.

BudiBadu Logo

Atrium Performance Call Sheet

Sorting Algorithms Medium 0 views

The atrium's performance director keeps a fast-moving call sheet where each ensemble signs in with stage@act@priority. The sheet preserves exactly what they wrote—stage nicknames, stylized act titles, and a numeric priority that determines who rehearses first. By the time the sound check starts, the list is a scramble, making it hard to brief lighting or schedule the rotating platforms. The director needs a helper routine that transforms the raw entries into a neatly ordered list ready for broadcast to the crew.

Each returned string must read "priority - stage: act", preserving the original stage and act text. Sorting should use the integer priority segment first, then the stage name alphabetically, and finally the act title using case-insensitive comparison when both earlier keys match. The function may not alter the original list; it should build a fresh sequence while leaving every character in the recorded strings untouched.

Before doors open, coordination compares the helper's output with a master schedule. Anything out of position forces an on-the-fly reshuffle that delays rehearsals and confuses the crew radios. Provide a list that aligns perfectly, including the quiet case where no entries were captured and an empty list tells the director the atrium floor stays dark.

Example 1:

Input: entries = ["StageA@Lantern Waltz@2","StageB@Harbor Hymn@1","StageA@Lantern Waltz@1","StageC@Echo Lines@3"]
Output: ["1 - StageA: Lantern Waltz","1 - StageB: Harbor Hymn","2 - StageA: Lantern Waltz","3 - StageC: Echo Lines"]
Explanation: Priority controls first, with ties broken by stage and then act name.

Example 2:

Input: entries = ["NorthWing@Aurora Bloom@4","Center@ember chorus@4","Center@Ember Chorus@4"]
Output: ["4 - Center: Ember Chorus","4 - Center: ember chorus","4 - NorthWing: Aurora Bloom"]
Explanation: Priorities match, so stages sort alphabetically, and the act titles compare case-insensitively while preserving text.

Example 3:

Input: entries = ["Balcony@Solo Light@6"]
Output: ["6 - Balcony: Solo Light"]
Explanation: A single entry is reformatted without reordering.

00:00
Loading editor...
Test Results

Run your code to see test results

Click the Submit button to execute your solution

Related Problems

No related problems found

Comments (0)

Join the Discussion

Share your thoughts, ask questions, or help others with this problem.