There are two options for adding an element to an ArrayList: add(value); - adding a value to the end of the ArrayList add(index, value); - adding a value to the right place by index. For example:
add(value);
add(index, value);
arr.add(10); span> arr.add(5,10);
Given an array of N positive elements greater than 1 (\(2<=N<=100\) ). Insert the value a before all elements that are multiples of a.
N
a
1000 ms 256 Mb Rules for program design and list of errors in automatic problem checking