Count pairs where arr[i] > 3 * arr[j].
Unlock detailed company stats for this questionUpgrade
Given an array of size n, count pairs of indices (i, j) with i < j such that arr[i] > 3 * arr[j]. 1 <= n <= 1e5, 0 <= arr[i] <= 1e9. A classic PBDS application.
Format · OA, 3 questions in 90 minutes.
Community answers
No answers contributed by the community yet.
Related questions
Count ordered pairs (i, j) where a[i] - a[j] = i - j.Count the unordered pairs where i < j, code[i] = code[j] and j - i <= k.Count Perfect Pairs.Related courses

Course

Course
Course
