Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 446 Bytes

File metadata and controls

11 lines (8 loc) · 446 Bytes

Problem 11: Divide and Merge Sort

Problem Statement

Implement the Merge Sort algorithm to sort an array of integers in ascending order. Merge sort is a divide-and-conquer algorithm that works by recursively breaking down a problem into two or more sub-problems until these become simple enough to be solved directly.

Input Format

  • An unsorted integer array nums.

Example

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