You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given an array of integers. Find the Inversion Count in the array.
3
+
4
+
Inversion Count: For an array, inversion count indicates how far (or close) the array is from being sorted. If array is already sorted then the inversion count is 0.
5
+
If an array is sorted in the reverse order then the inversion count is the maximum.
6
+
Formally, two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j.
0 commit comments