Left Rotation Of Array In Python Hackerrank Solution Code Example


Example: arrays left rotation hackerrank solution

int n,d;     cin>>n;     int a[n];     cin>>d;     for(int i=0;i<n;cin>>a[i],i++);     d=d%n;     for(int i=d;i<n;i++)         cout<<a[i]<<" ";          for(int i=0;i<d;i++)          cout<<a[i]<<" ";     return 0;

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable