Pergunta de entrevista da empresa Meta

Given an array , I had select an subarray which summation is equal to a pre supplied number.

Resposta da entrevista

Sigiloso

22 de jan. de 2022

Start with i,j at 0 and current sum at num[0], if the sum is less than target, move j by 1 and add to sum, when the sum is greater, move i by 1 and remove it from the sum.