Return Growing NumList This function will be given a single number, it should return a list of strings of numbers. Each string in the list will only contain a single number repeated an arbitrary...


Return Growing NumList<br>This function will be given a single number, it should return a list of strings of numbers. Each string in the list<br>will only contain a single number repeated an arbitrary amount of times. The number each string will contain<br>will be equal to the current string's index+1. The number in the string should be repeated the same number of<br>times as the string's index+1. Each number in the string should be separated by a space. This list should stop<br>when its size equals the max number specified.<br>Signature:<br>public static ArrayList<String> returnGrowingNumList(int max)<br>Example:<br>INPUT: 3<br>OUTPUT: [1, 22, 333]<br>INPUT: 6<br>OUTPUT: [1, 22, 333, 444 4, 55555, 666666]<br>

Extracted text: Return Growing NumList This function will be given a single number, it should return a list of strings of numbers. Each string in the list will only contain a single number repeated an arbitrary amount of times. The number each string will contain will be equal to the current string's index+1. The number in the string should be repeated the same number of times as the string's index+1. Each number in the string should be separated by a space. This list should stop when its size equals the max number specified. Signature: public static ArrayList returnGrowingNumList(int max) Example: INPUT: 3 OUTPUT: [1, 22, 333] INPUT: 6 OUTPUT: [1, 22, 333, 444 4, 55555, 666666]

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here