algorithms.tutorialhorizon.com
Find no of reverse pairs in an array which is sorted in two parts | Algorithms
Given an array of integers A>A. Example: A[] = {4, 6, 8, 9, 1, 5, 10, 11} Output: 7 Explanation: Part one: {4, 6, 8, 9} Part two: {1, 5, 10, 11} Reversed pairs: (4, 1) (6, 1) (6, 5) (8, 1) (8, 5) (9, 1) (9, 5) = 7