Menu
support@nursinghomework.org
+1 714-215-3097

(Solved) : Write Method Called Interleave Accepts Two Arraylists Integers A1 A2 Parameters Inserts El Q35602099

Write ONLY A METHOD called interleave that accepts twoArrayLists of integers a1 and a2 as parameters and inserts theelements of a2 into a1 at alternating indexes. If the lists are ofunequal length, the remaining elements of the longer list are leftat the end of a1. For example, if al stores[10, 20, 30] and a2stores[4,5,6,7,8], the call of interleave(a1,a2); should change a1to store[10,4, 20, 5, 30, 6, 7, 8]. If al had stored[10,20,30,40,50] and a2 had stored[6,7,8], the call ofinterleave(a1, a2); would change a1 to store[10,6,20, 7, 30,8,40,50].

Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *