InterviewSolution
Saved Bookmarks
| 1. |
Define minial pairs product sum? |
|
Answer» Write a function that receives an array of integers and returns the MINIMAL sum of the array (sum of products of each TWO ADJACENT numbers). For Example: Without sorting the array [40,25,10,5,1], the sum is: (40*25) + (25*10) + (10*5) + (5*1) = 1305 |
|