Pregunta de entrevista de ING

Via a hackerrank online test - finding sub-array of an array with the element sum <= a given number.