Write a method called rotate that moves the value at the front of a list of integers

Question:

Write a method called rotate that moves the value at the front of a list of integers to the end of the list. For example, if a variable called list stores [8, 23, 19, 7, 12, 4], the call of list.rotate(); should move the value 8 from the front of the list to the back of the list, producing [23, 19, 7, 12, 4, 8].

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: