Closest product pair in an array - GeeksforGeeks
Given an array of non negative integers and a number x, find a pair in array whose product is closest to x.
Examples:
Input : arr[] = [2, 3, 5, 9] x = 47 Output : {5, 9} Input : arr[] = [2, 3, 5, 9] x = 8 Output : {2, 5}
Read full article from Closest product pair in an array - GeeksforGeeks
No comments:
Post a Comment