Meta Interview Question

Given an array of size n, find k consecutive elements that has the sum n

Interview Answer

Anonymous

Jan 4, 2019

n -= array[i - k]; n += array[i]; - and + were reversed