Question: How would you write this in Java, you take the first element in the array and then write that out the second equal times in
How would you write this in Java, you take the first element in the array and then write that out the second equal times in the expanded array. then you take the third element and write the fourth. etc.
arr expanded [1, 9, 1, 5, 1, 7] [10, 2] [2, 9, 3, 21, 1, 7] [9, 5, 7] [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] [9, 9, 21, 21, 21, 7]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
