You are viewing a single comment's thread. Return to all comments →
Neatest code to get this done!!!
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;
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotation
You are viewing a single comment's thread. Return to all comments →
Neatest code to get this done!!!