阅读背景:

查找要由给定数字替换的数组中的元素数,使得数组的总和小于另一个给定数

来源:互联网 

I need help with a certain problem.Suppose you are given a sorted array "A", which has "N" elements and two integers "X" and "Y". Now you are asked two find the number of elements in "A" you have to replace with "X" such that the sum of the array "A" is less than "Y". The given problem can be easily solved in O(n^2) using the following technique.(Only the code snippet for this is specific operation).I need help with a certain problem.Suppose you




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: