Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 404 Bytes

File metadata and controls

11 lines (8 loc) · 404 Bytes

Problem 12: Pivot-Based Partitioning

Problem Statement

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.

Input Format

  • An unsorted integer array nums.

Example

Input: nums = [5, 2, 3, 1]
Output: [1, 2, 3, 5]