Atrium Performance Call Sheet
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.
Algorithm Flow

Best Answers
import java.util.*;
class Solution {
public String[] atrium_performance_call_sheet(String[] entries) {
List<String[]> parsed = new ArrayList<>();
for (String entry : entries) {
String[] parts = entry.split("@");
parsed.add(new String[]{parts[2], parts[0], parts[1], parts[1].toLowerCase()});
}
parsed.sort((a, b) -> {
int p = Integer.compare(Integer.parseInt(a[0]), Integer.parseInt(b[0]));
if (p != 0) return p;
int s = a[1].compareTo(b[1]);
if (s != 0) return s;
return a[3].compareTo(b[3]);
});
String[] result = new String[parsed.size()];
for (int i = 0; i < parsed.size(); i++) {
String[] p = parsed.get(i);
result[i] = p[0] + " - " + p[1] + ": " + p[2];
}
return result;
}
}Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this problem.
