Pergunta de entrevista da empresa Meta

Given an integer x and an array y, create a function that returns true if x exists as a sum of any contiguous elements in y.