Skip to content
Related Articles
Open in App
Not now

Related Articles

GATE | GATE CS 1997 | Question 61

Improve Article
Save Article
  • Last Updated : 25 Oct, 2017
Improve Article
Save Article

An array A contains n≥1 positive integers in the locations A[1], A[2],… A[n]. The following program fragment prints the length of a shortest sequence of consecutive elements of A, A[i], A[i+1],…A[j] such that the sum of their values is ≥M, a given positive number. It prints ‘n+1’ if no such sequence exists. Complete the program by filling in the boxes. In each case use the simplest possible expression. Write only the line number and the contents of the box.
ccc


Answer:

Explanation:

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!