Sort an Array of Integers

Given an array of integers, sort it in non-decreasing order.

Input Format

nums = array of integers

Output Format

Sorted array

Constraints

  • 0 <= nums.length <= 10^5

Examples

Example 1:

Input:

nums = [5,2,3,1]

Output:

[1,2,3,5]

Explanation:

Sorted order.

Loading...
Sort an Array of Integers - Arrays DSA Problem