BudiBadu Logo
00:00

Studio Lighting Slots

Sorting Algorithms Easy 0 views

Backstage in the broadcast studio, the assistant director logs every lighting slot number as crews plug fixtures into the grid, but the board captures the frantic setup order instead of the calm progression the director wants on the call sheet. To keep rehearsals smooth, the team needs a helper routine that reads the incoming slot numbers and produces a fresh list where the values rise steadily from the smallest slot to the largest. The original capture stays in the archive for compliance, so the helper must provide a separate ordered copy that technicians can paste into their cue sheets without losing a single slot.

Dress rehearsals frequently pair identical lights for mirrored scenes, and maintenance flags blocked circuits with negative placeholders, so the returned list has to preserve every number exactly as it arrived while simply arranging them in ascending order. When the capture already runs from low to high, the director expects the helper to echo the same sequence and know nothing was disturbed. Before cameras roll, stage management compares the helper's output with a verified plan and pauses the run-through if even one slot is missing or misplaced. Deliver a response that mirrors the reference perfectly, including the quiet case where no slots were captured and an empty list reassures the crew.

Example 1:

Input: nums = [6,2,6,4]
Output: [2,4,6,6]
Explanation: Duplicate lighting slots remain while the list climbs from lowest to highest.

Example 2:

Input: nums = [3,-1,3,0]
Output: [-1,0,3,3]
Explanation: Negative flags and standard slots stay visible in ascending order.

Example 3:

Input: nums = [11]
Output: [11]
Explanation: A single slot stays the same because the order was already correct.

Related Problems

No related problems found

Comments (0)

Join the Discussion

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

BudiBadu Logo

Studio Lighting Slots

Sorting Algorithms Easy 0 views

Backstage in the broadcast studio, the assistant director logs every lighting slot number as crews plug fixtures into the grid, but the board captures the frantic setup order instead of the calm progression the director wants on the call sheet. To keep rehearsals smooth, the team needs a helper routine that reads the incoming slot numbers and produces a fresh list where the values rise steadily from the smallest slot to the largest. The original capture stays in the archive for compliance, so the helper must provide a separate ordered copy that technicians can paste into their cue sheets without losing a single slot.

Dress rehearsals frequently pair identical lights for mirrored scenes, and maintenance flags blocked circuits with negative placeholders, so the returned list has to preserve every number exactly as it arrived while simply arranging them in ascending order. When the capture already runs from low to high, the director expects the helper to echo the same sequence and know nothing was disturbed. Before cameras roll, stage management compares the helper's output with a verified plan and pauses the run-through if even one slot is missing or misplaced. Deliver a response that mirrors the reference perfectly, including the quiet case where no slots were captured and an empty list reassures the crew.

Example 1:

Input: nums = [6,2,6,4]
Output: [2,4,6,6]
Explanation: Duplicate lighting slots remain while the list climbs from lowest to highest.

Example 2:

Input: nums = [3,-1,3,0]
Output: [-1,0,3,3]
Explanation: Negative flags and standard slots stay visible in ascending order.

Example 3:

Input: nums = [11]
Output: [11]
Explanation: A single slot stays the same because the order was already correct.

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.