← Adobe questions

Inversion count in an array using merge sort

Filed under Adobe

Given an array of integers, count the number of inversions. An inversion is defined as a pair (i, j) such that i < j and arr[i] > arr[j]. Use a modified merge sort to achieve O(n log n) time…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Adobe questions

Collected from public candidate posts and coding forums. Updated Nov 2026.