Merge Sort

Given an array of integers nums, sort the array in ascending order.

Algorithm

Merge-Sort-Tutorial

Code

Time complexity of Merge Sort is θ(nLogn) in all 3 cases (worst, average and best)

Last updated

Was this helpful?