Atrium Tour Sorter
The technical objective is to reorder a collection of tour badge numbers, provided as an array of integers, into a strictly ascending sequence. This operation transforms raw signup logs into a structured roster that enables docents to manage meeting points, verify inventory, and ensure a predictable visitor flow.
The final output must be a new array containing all original badge numbers, including duplicates for family groups and negative placeholders for gallery closures, arranged from smallest to largest value. The solution must handle various dataset sizes, including single-badge entries and empty collections, while preserving the numerical integrity of every record. This provides a reliable data structure for staging atrium tours and compliance reporting.
Example 1:
Input: nums = [18, 4, 9, 4]
Output: [4, 4, 9, 18]
Example 2:
Input: nums = [0, -3, 7]
Output: [-3, 0, 7]
Example 3:
Input: nums = []
Output: []
Algorithm Flow

Best Answers
import java.util.*;
class Solution {
public int[] sort_atrium_badges(int[] nums) {
int[] sortedArr = nums.clone();
Arrays.sort(sortedArr);
return sortedArr;
}
}Comments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this problem.
