【Goldman Sachs面经】 OA 2020 | Continuous Sub Sequence Sum 其他公司 OA 开发岗

喵贵妃 2020-5-17 1031


Question - Given an array of unsorted integers and number N, find out number of continuous sub sequences where each sub sequence sum is N.

Example - Input -

N = 6

[2,4,1,5,6]

Output = 3

Explanation - Possible sub sequences {6},{2,4},{1,5}

Similar Problem - https://leetcode.com/problems/subarray-sum-equals-k/

最后于 2020-6-1 被maomoke编辑 ,原因:
最新回复 (0)
返回