Rebel Foods Backend Hiring Challenge | OA APR 2021
Anonymous User
512

Given an array of unique integers, find total number of power pairs?

A power pair in an array A is defined as, pow(A[i], A[j]) >= pow(A[j], A[i]) and 0<=i<j<N

Input: A = [1,4,5,2,3]
output = 2

Constraints:

2 <= A.length < 10^5

Comments (1)