How to Apply merge sort here?

I knew merge sorting,but didnt getting how to apply this here->

Please Explain what actually problem demands?


The problem is about to find sigma(n) where n is the total number of numbers not following the ascending order.

1 Like

Did you checked the setter’s solution.

then we can check a[i] and a[i+1] and use counter?

Most probably…but constraints are 10^5,keep this in mind.

sorry but answers are different,you can check example,In editorial they are using merge sort…