/** Finds ALL runs of X consecutive positive integers that sum to a given number for all X in a specified range.

/** Finds ALL runs of X consecutive positive integers that sum to a given number for all X in a specified range.

* The range bounds are inclusive.

*

* Examples:

* runs(9,2,3) -> [ [4,5], [2,3,4] ] // two runs found

* runs(9,1,1) -> [ [9] ] // one run found

* runs(9,4,8) -> [ ] // no runs found!

* runs(125,1,8) -> [ [125], [62,63], [23,24,25,26,27]] // 3 runs!

*

* number must be a positive integer

* start is lower bound for the range (of consecutive numbers in the sum). It is a positive integer.

* end is the upper bound for the range (of consecutive numbers in the sum). It is a positive

* integer that is not smaller than start.

* return an array of arrays. Each inner array is a sequence of consecutive positive

* integers that sum to the input number. The ordering inside the arrays is that

* is the natural ordering (increasing order by value), and the ordering of the inside arrays

* is by increasing length.

*/

public static int[][] runs(int number, int start, int end){

return null;

}

Complete Answer:

Get Instant Help in Homework Asap
Get Instant Help in Homework Asap
Calculate your paper price
Pages (550 words)
Approximate price: -
Open chat
1
Hello 👋
Thank you for choosing our assignment help service!
How can I help you?