Computer Science, asked by rsonakshi1448, 1 year ago

Describe how to skip part or a loop using break and continue statement.

Answers

Answered by Anonymous
3

Answer:

The major difference between break and continue statements in C language is that a break causes the innermost enclosing loop or switch to be exited immediately. ... The continue statement is used when we want to skip one or more statements in loop's body and to transfer the control to the next iteration.

....

Answered by Anonymous
1

Answer:

Here is a sketch of an algorithm:

For each input number, determine to which interval it belongs, and update corresponding sum: S[int_log(x)] += x.

Compute prefix sum for array S: foreach i: C[i] = C[i-1] + S[i].

Filter array C to keep only entries with values lower than next power of 2

Similar questions