Find a pair with maximum product in array of Integers
Given an array with both +ive and -ive integers, return a pair with highest product.
Examples:
Input: arr[] = {1, 4, 3, 6, 7, 0} Output: {6,7}
Input: arr[] = {-1, -3, -4, 2, 0, -5} Output: {-4,-5}
http://www.geeksforgeeks.org/return-a-pair-with-maximum-product-in-array-of-integers/
Variation 1:
Find the largest pair sum in an unsorted array
Given an unsorted of distinct integers, find the largest pair sum in it. For example, the largest pair sum in {12, 34, 10, 6, 40} is 74.
http://www.geeksforgeeks.org/find-the-largest-pair-sum-in-an-unsorted-array/
Given an array with both +ive and -ive integers, return a pair with highest product.
Examples:
Input: arr[] = {1, 4, 3, 6, 7, 0} Output: {6,7}
Input: arr[] = {-1, -3, -4, 2, 0, -5} Output: {-4,-5}
http://www.geeksforgeeks.org/return-a-pair-with-maximum-product-in-array-of-integers/
Variation 1:
Find the largest pair sum in an unsorted array
Given an unsorted of distinct integers, find the largest pair sum in it. For example, the largest pair sum in {12, 34, 10, 6, 40} is 74.
http://www.geeksforgeeks.org/find-the-largest-pair-sum-in-an-unsorted-array/
No comments:
Post a Comment