This is a very good channel. Great explanation! I watched the video half, understood the logic I need to apply and implemented the code by myself. All test cases passed. Thanks!
@avnimahajan44172 жыл бұрын
vector rotLeft(vector a, int d) { for (int i=0;i
@krishanudutta29433 жыл бұрын
Thanks sir for helping us out
@KnowledgeCenter3 жыл бұрын
It's my pleasure
@sindhusiva45803 жыл бұрын
sir, how you started problem solving and how??
@sajalsuhane86442 жыл бұрын
what will happen if value of d is greater than the size of vector?
@techlyric7 ай бұрын
but it starts from a.begin and till d-1 as per your explanation, then why in code it is till d only?
@techlyric7 ай бұрын
as in a.begin() +d, it should be rather (d-1)?
@krishanudutta29433 жыл бұрын
Sir can't we do it in normal way without using vector? pls help me sir...
@sohamkatkar45354 жыл бұрын
I didn't understand why we iterated the second for loop till a.begin()+d. In the ex. we want to consider only the first two elements then why the loop is iterated from 0 to 2? Can someone explain.
@dipakkumarpanigrahi92644 жыл бұрын
Sir I tried this but it's showing segmentation fault in test cases 5 to 9
@KnowledgeCenter4 жыл бұрын
Can you share your code?
@dipakkumarpanigrahi92644 жыл бұрын
Sir please tell me the solution
@rishabhgoel98614 жыл бұрын
Why are we using "auto it" instead of "int it" inside the for loop ?
@programmingwithsikander35394 жыл бұрын
auto is a c++11 construct where it determines the type of variable based on type of initializer. for further details refer kzbin.info/www/bejne/ZnqQl4l9oKx5iZI
@subhamjyoti11294 жыл бұрын
since we are using it for vector , it should be written like this (vector::iterator it; ;) , it lengthy to right , so we use auto .