对于快速排序过程中一个的问题:为什么在qsort中递归时,需要将递归范围改为[lo, pos-1]而不是[lo, pos]?
523. Continuous Subarray Sum
发表于
|
分类于
leetcode
Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to a multiple of k, that is, sums up to nk where n is also an *integer**.
33. Search in Rotated Sorted Array
发表于
|
分类于
leetcode
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.
(i.e., [0,1,2,4,5,6,7]
might become [4,5,6,7,0,1,2]
).