## Count Inversions

Problem Given an array of integers, count the number of inversions present in it. An inversion is such that arr[i] > arr[j] and i<j. Sample Input [3, 4, 1] Sample Output Inversion count is 2 Approach 1 Traverse through the array, and for every index, find the number of smaller elements on its right side. This can be… Read More »