Catalog Shelf Lineup
In the studio catalog center, sample labels arrive in a jumble. Your task in Catalog Shelf Lineup is to take this arrival list and return a brand-new version where the numbers run from the smallest label to the largest. The original list must stay untouched for auditing, so your helper routine creates a separate, orderly layout that the styling team can use to plan their storyboard shoot.
The "secret sauce" here is Non-Destructive Sorting. Your shipment might include matching props (duplicate labels) or negative placeholders for items still in transit. Your routine must keep every single entry present, placing them into ascending order without compression or padding. This ensures the production lead can trust the final shot list, avoiding manual recounts that disrupt the entire photo set. It’s a fast, reliable, and professional way to keep the studio running with maximum efficiency!
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
Negative placeholders and repeats remain visible in ascending order.
A single sample remains unchanged because it is already in order.
Matching labels appear together after sorting while the smallest value leads the list.
Algorithm Flow

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