You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return true; // when arr size becomes 1 i.e there is only 1 element then sure shot it is sorted array
}
bool restArray = sorted(arr+1,n-1); //(arr+1)-->pointer passes to the 1st element which was initially before at 0th position & (n-1)->size of array decreases from 1.