A sculptor lays numbered stones from smallest magnitude to largest, breaking ties numerically. Task: Sort by increasing absolute value; equal magnitudes are ordered by increasing numeric value. Input format: Read n followed by n integers. Output format: Print sorted values on one line separated by single spaces. Constraints: 1 <= n <= 100000; -10^9 <= values <= 10^9
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 100000; -10^9 <= values <= 10^9
Tags:
