BudiBadu Logo
00:00

Atrium Tour Sorter

Sorting Algorithms Easy 0 views

Inside the glass atrium, docents record tour badge numbers the moment groups check in, but the signup tablet reflects the unpredictable arrival order rather than the gentle flow the lead planner posts on the welcome stand. The planner needs a helper routine that reads the raw badge list and produces a new copy where every number climbs from the smallest badge to the largest. Because the tablet archive is kept for compliance, the routine must create a separate, polished roster that keeps each badge intact while presenting the calm sequence the guides rely on to stage meeting points, count headsets, and reassure visitors that nothing is missing.

Season passes sometimes generate matching badge numbers for families, and facilities staff flag temporarily closed galleries with negative placeholders, so the returned roster has to preserve every entry and only shift them into ascending order. When the signup already happens to be perfectly sorted, the helper should echo back the same list so the planner knows the schedule is ready as-is. Before the first tour departs, operations compares the helper's output with a trusted reference sheet and pauses visitors at the fountain if any badge is misplaced. Deliver a response that matches the reference exactly, including the quiet case where no badges were captured and an empty list confirms the morning slate is clear.

Example 1:

Input: nums = [18,4,9,4]
Output: [4,4,9,18]
Explanation: Duplicate family badges remain while the list climbs from lowest to highest.

Example 2:

Input: nums = [0,-3,7]
Output: [-3,0,7]
Explanation: Negative placeholders and positive badges appear together in ascending order.

Example 3:

Input: nums = []
Output: []
Explanation: An empty signup produces an empty roster for the guides.

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 Tour Sorter

Sorting Algorithms Easy 0 views

Inside the glass atrium, docents record tour badge numbers the moment groups check in, but the signup tablet reflects the unpredictable arrival order rather than the gentle flow the lead planner posts on the welcome stand. The planner needs a helper routine that reads the raw badge list and produces a new copy where every number climbs from the smallest badge to the largest. Because the tablet archive is kept for compliance, the routine must create a separate, polished roster that keeps each badge intact while presenting the calm sequence the guides rely on to stage meeting points, count headsets, and reassure visitors that nothing is missing.

Season passes sometimes generate matching badge numbers for families, and facilities staff flag temporarily closed galleries with negative placeholders, so the returned roster has to preserve every entry and only shift them into ascending order. When the signup already happens to be perfectly sorted, the helper should echo back the same list so the planner knows the schedule is ready as-is. Before the first tour departs, operations compares the helper's output with a trusted reference sheet and pauses visitors at the fountain if any badge is misplaced. Deliver a response that matches the reference exactly, including the quiet case where no badges were captured and an empty list confirms the morning slate is clear.

Example 1:

Input: nums = [18,4,9,4]
Output: [4,4,9,18]
Explanation: Duplicate family badges remain while the list climbs from lowest to highest.

Example 2:

Input: nums = [0,-3,7]
Output: [-3,0,7]
Explanation: Negative placeholders and positive badges appear together in ascending order.

Example 3:

Input: nums = []
Output: []
Explanation: An empty signup produces an empty roster for the guides.

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.