##
Find all pairs (a,b) and (c,d) in array which satisfy ab = cd
March 29, 2017

Given an array of distinct integers, the task is to find two pairs (a, b) and (c, d) such that ab = cd, where a, b, c and d are distinct elements. Examples: Input : arr[] = {3, 4, 7, 1, 2, 9, 8} Output : 4 2 and 1 8 Product of 4 and… Read More »