why the rotate starts from 30 instead of starting can u tell
Regarding the rotate
hello @ssmit_joshi could you please elaborate in which question you are using rotate and what do you exactly want to ask ?
in the next permutations video there is rotate and it hase given number 10,20,30,40,50 but why the rotate starts from middle of the element , why not from the starting or end
hey @ssmit_joshi the rotate starts from the middle beccause prateek sir is passing the parameters like that only .
if you clearly juge the program he had written there he is passing parameters like :
rotate(arr,arr+2,arr+n);
here arr+2 is the point from where the rotating should start and arr+n is the point from where the rotating should stop .
is you pass arr+0 then it would do the sorting from starting .
if you still have doubt please ask here .
Happy Learning !!
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.