Solution: Sort an Array
Let's solve the Sort an Array problem using the Heaps pattern.
We'll cover the following...
Statement
Given an integer array, nums, sort it in ascending order and return the sorted array.
You must implement the sorting algorithm yourself; do not use any built-in sorting functions. The solution must run in
time and use the minimum possible extra space.
Constraints:
nums.lengthnums[i]...
Ask