* Code : https://www.codingninjas.com/studio/problems/number-of-inversions_6840276?utm_source=youtube&utm_medium=affiliate&utm_campaign=striver_Arrayproblems ...
The merge sort is popular for two reasons: 1) its worst case is O(n log n), and 2) it has a property known as stable. Like all sorting algorithms, it has downsides. Here the downside requiring O(n) ...