Count pairs in array such that one element is power of another
Given an array arr[], the task is to count the pairs in the array such that one element is the power of another in each pair.Examples: Input: arr[] = {16, 2, 3, 9} Output: 2 The 2 pairs are (16, 2) and (3, 9) Input: arr[] = {2, 3, 5, 7} Output: 0 Approach: After taking the array as input, first we n