Imagine the user enters a list of integers. Return a new list where you add the number 3 after every number 3 in the original list.
For example, if the original list was [4,5,3,3,6,5,3] the new list would be [4,5,3,3,3,3,6,5,3,3] .To save time, we've created a result array for you that is 100 elements long, and filled with zeroes; you can simply place the kept items into this array, in order. The grading script will remove the extra zeroes at the end automatically (and you can take a look at the cleanResult method in the template if you're curious how it works).Please do not use any Java code or libraries that we have not covered in class; this defeats the purpose of the assessment. |