In the zip file there is a file called [login to view URL] that contains the outlines of two methods,
public static void rotateRight(int[] a, int n)
public static int[] rotateLeft(int[] a, int n)
These are methods that you need to complete. When they are completed, you can compile and run the program [login to view URL] and it should produce output exactly like the file [login to view URL]
The first method rotateRight() takes as its parameters a reference a to an integer array and a positive integer n and it "rotates" the contents of the array to the right n places. So each element a[i] of the array should be moved to location a[i+n]. If the index i+n is past the end of the array (that is, i+n >= [login to view URL]), then that index should "wrap" back to the beginning of the array.
For example, if the input array is a = {1, 2, 3, 4, 5}, then rotateRight(a, 2) should modify a to contain {4, 5, 1, 2, 3}.
Notice that rotateRight() is a void method since it does not return anything. The job of this method is to modify the input array. Since the method has a reference to the array, any changes this method makes to the array are noticed by the method's caller (you should draw a picture to see why this is true).
Write this method as a two step process. The first step is to copy the elements of the input array into a new "temporary" array. After everything from the input array has been copied to the temporary array, then the second step is to copy the contents of the temporary array back into the input array but put into their shifted positions.
The second method rotateLeft() takes in a reference a to an integer array and a positive integer n and it returns a new array whose contents is the contents of the input array rotated to the left n places. So each element a[i] of the input array should be placed at location b[i-n] of the returned array. If the index i-n is negative, then that index should "wrap" around to the end of the output array.
For example, if the input array is a = {1, 2, 3, 4, 5}, then rotateLeft(a, 2) should return an array containing {3, 4, 5, 1, 2}.
This method should not make any changes to the input array.
Hi.
As a senior ALGORITHM expert, I have seen your proposal carefully.
I can satisfy your requirement fully.
You will get excellent result if you hire me.
Looking forward to hearing from you soon.
Hello,
IF YOU ARE LOOKING FOR QUALITY BASED WORK THEN YOUR SEARCH MAY END HERE......
I have around 15 years of solid development work with many technologies like IoT, java, JEE, Android, iOS, Swift, Javascript, PHP, HTML, Bootstrap, ReactNative, Flutter, Node.js. I am a full stack developer with front end and backend development skills. Please check my profile and reviews.
I am interested to take up this opportunity to work on it.
If you can spare some time to discuss I can be the ideal person you are looking for.
I am available 24/7 and thus negate the possibility of poor communication.
Thank you for your time and consideration.
Looking forward to hearing back from you on the same.
With Best Regards,
Krish
Hello,
⭐⭐⭐⭐⭐
i am interested in algorithms and java jobs ,
please check my profile
i can do this assignment within few hours
can begin now
waiting your answer on chat
Regards
⭐⭐⭐⭐⭐
Hello,
I'm a Java developer with over 9 years experience. I'd be able to write this code for you quickly. if you have any questions please reach out.
Thanks,
Ryan