Find Jobs
Hire Freelancers

Testing programming

$10-30 USD

Closed
Posted about 4 years ago

$10-30 USD

Paid on delivery
Problem A left rotation operation on an array shifts each of the array's elements ​1 unit to the left. For example, if ​2 left rotations are performed on array ​[1, 2,3,4,5] ​ , then the array would become​[3,4, 5, 1, 2] ​ . Given an array ​a of ​n ​ integers and a number, ​d ​ , perform ​d left rotations on the array. Return the updated array to be printed as a single line of space-separated integers. Function Description Complete the function rotLeft in the editor below. It should return the resulting array of integers. rotLeft ​ has the following parameter(s): ● An array of integers ​a ​ . ● An integer ​d ​ , the number of rotations. Input Format The first line contains two space-separated integers ​n ​ and ​d ​ , the size of ​a ​ and the number of left rotations you must perform. The second line contains ​n ​ space-separated integers ​a[i] ​ . Constraints - 1 <= n <= 10^5 - 1 <= d <= n - 1 <= a[i] <= 10^6 Output Format Print a single line of ​n ​ space-separated integers denoting the final state of the array after performing d ​ left rotations. Sample Input 5 4 1 2 3 4 5 Sample Output 5 1 2 3 4
Project ID: 25504526

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
7 freelancers are bidding on average $17 USD for this job
User Avatar
Hello, this a very simple program. I will send you the code tonight with a very helpful and clean explanation Of you accept my offer. Thank you
$20 USD in 1 day
5.0 (1 review)
1.5
1.5
User Avatar
I am expertised web designer in HTML, CSS, Javascript.I am sure that i can give your work on time only.
$25 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Good day, I will gladly help you with your project. I understand your specifications and will definitely be able to help you with it. In what language do you want this to be done? As from the skills required, I guess Javasript? Which is no problem for me. Do not hesitate to contact me with any enquiries.
$16 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I can give a solution that works with very large numbers of a, n and d. I can do this both in JavaScript/Python as per needs.
$10 USD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I have +5 years of experance in website development, i have better knowledge in data manuplation, i will complete your task in 1 day.
$10 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of CHINA
Dalian, China
0.0
0
Member since Feb 13, 2020

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.