摘要:
给定一个由 n 个正整数组成的数组和一个正整数 s ,请找出该数组中满足其和 ≥ s 的最小长度子数组。如果无解,则返回 -1。 样例 给定数组 [2,3,1,2,4,3] 和 s = 7, 子数组 [4,3] 是该条件下的最小长度子数组。 挑战 如果你已经完成了O(n)时间复杂度的编程,请再试试 阅读全文
摘要:
Given an array of non-negative integers. Our task is to find minimum number of elements such that their sum should be greater than the sum of rest of 阅读全文