Implement the Quick Sort algorithm to sort an array of integers in ascending order. Quick Sort is a divide-and-conquer algorithm that picks an element as a 'pivot' and partitions the given array around the picked pivot.
- An unsorted integer array
nums.
Input: nums = [5, 2, 3, 1]
Output: [1, 2, 3, 5]