Consider an array of numeric strings where each string is a positive number with…
- User
Consider an array of numeric strings where each string is a positive number with anywhere from to digits. Sort the array's elements in non-decreasing, or ascending order of their integer values and return the sorted array.
Example
Return the array ['1', '3', '150', '200'].
Function Description
Complete the bigSorting function in the editor below.
bigSorting has the following parameter(s):
string unsorted[n]: an unsorted array of integers as strings Returns
string[n]: the array sorted in numerical order Input Format
The first line contains an integer, , the number of strings in . Each of the subsequent lines contains an integer string, .
Constraints
Each string is guaranteed to represent a positive integer. There will be no leading zeros. The total number of digits across all strings in is between and (inclusive).
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.