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

(Solved) : Write Method Called Reverse3 Accepts Arraylist Integer Values Parameter Reverses Successiv Q35601898

Write ONLY A METHOD called reverse3 that accepts an ArrayList ofinteger values as a parameter and reverses each successive sequenceof three values in the list. If the list has extra values that arenot part of a sequence of three, those values are unchanged. Forexample, if a list has extra values [3, 8, 19, 42, 7, 26, 19, -8],after the call the list should store values [19, 8, 3, 26, 7, 42,19, -8]. The first sequence of three (3, 8, 19) has been reversedto be(19, 8,3). The second sequence *42, 7, 26) has been reversedto be(26, 7, 42), and so on. Notice that 19 and -8 are unchangedbecause they were not part of a sequence of three values.

Leave a Reply

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