ByteByteGo logo
menuProblems List

Sort Array

Medium

Given an integer array, sort the array in ascending order.

Example:

Input: nums = [6, 8, 4, 2, 7, 3, 1, 5]
Output: [1, 2, 3, 4, 5, 6, 7, 8]

You can practice coding exercises online by logging into bytebytego.com on your laptop.