Atrium Performance Call Sheet
The atrium’s director manages a call sheet where ensembles sign in as stage@act@priority. By sound check, the list is a scramble. Your mission in Atrium Performance Call Sheet is to transform these raw entries into a neatly formatted and ordered list ready for the crew radios.
The "secret sauce" is Custom Reformatting and Sorting. Each returned string must read "priority - stage: act". You must sort the list by integer priority, then by stage name alphabetically, and finally by the act title (case-insensitive). The function must be non-destructive, building a fresh sequence while leaving characters in the original strings untouched. Anything out of position could delay rehearsals and confuse the lighting team! This challenge turns a messy log into a professional-grade call sheet that keeps the entire atrium running smoothly throughout the festive evening!
If sorting is part of the strategy, do it intentionally as a preprocessing step to simplify downstream logic such as merging, ordering, or comparison. After sorting, keep output semantics precise: preserve expected structure, avoid dropping valid entries, and ensure tied cases still follow deterministic order rules.
Examples
A single entry is reformatted without reordering.
Priorities match, so stages sort alphabetically, and the act titles compare case-insensitively while preserving text.
Priority controls first, with ties broken by stage and then act name.
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.
