Open 7566565794 opened 5 years ago
using namespace std; int rotate(int arr[],int n){ if(n==1) return arr[0];
int temp=arr[n-1];
for(int i=n-1;i>0;i++){
arr[i]=arr[i-1];
}
arr[0]=temp;
cout<<"hello";
rotate(arr,n-1);
} int main(){ int t; cin>>t; for(int i=0;i<t;i++){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++){ cin>>arr[i]; } cout<<rotate(arr,n)<<endl; } } //check this code even this is not working
i know both the concepts although im not able to aggregate both of them together which is really bas and i wish i could have understood this thing before.okkkay so lets try to resolve this issue before 10 today put ur 100% or just see top solution if the end u are not able to do it......all the very best dear.. hope u will make it.