Find Jobs
Hire Freelancers

JAVA assigment

$10-30 USD

Completed
Posted over 4 years ago

$10-30 USD

Paid on delivery
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.
Project ID: 22695881

About the project

7 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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.
$20 USD in 7 days
5.0 (7 reviews)
3.6
3.6
User Avatar
Hello, I am experienced in python, C#, C++, C , java and node.js . please leave a message on my chat so we can discuss. Best, Malindu
$20 USD in 1 day
5.0 (3 reviews)
2.2
2.2
7 freelancers are bidding on average $37 USD for this job
User Avatar
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
$30 USD in 7 days
5.0 (50 reviews)
7.3
7.3
User Avatar
HI I have done many java and technical projects. You can share more details of your project in chat. Thank you...
$120 USD in 7 days
4.9 (80 reviews)
6.3
6.3
User Avatar
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 ⭐⭐⭐⭐⭐
$25 USD in 1 day
4.9 (87 reviews)
5.2
5.2
User Avatar
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
$15 USD in 1 day
5.0 (3 reviews)
4.8
4.8

About the client

Flag of UNITED STATES
Poughkeepsie, United States
5.0
4
Payment method verified
Member since Jan 31, 2017

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.