Count of elements A[i] such that A[i] * K is also present in the Array
Given an integer array arr[] and K, the task is to count the number of elements ‘A[i]’, such that A[i] * K is also present in the array. Note: If there are duplicates in the array, count them separately. Examples: Input : arr = { 2, 4, 5, 7, 10}, K = 2 Output : 2 Explanation :… Read More »