Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 399 Bytes

File metadata and controls

15 lines (11 loc) · 399 Bytes

Problem 20: The Sorted Merge (Merge Sort)

Problem Statement

Implement the Merge Sort algorithm using recursion. Given an unsorted array of integers, sort it in ascending order.

Input Format

  • An array of integers arr.

Constraints

  • 1 <= arr.length <= 5 * 10^4
  • -10^5 <= arr[i] <= 10^5

Example

Input: arr = [38, 27, 43, 3, 9, 82, 10]
Output: [3, 9, 10, 27, 38, 43, 82]