I honestly love your way of teaching, you would make an AMAZING professor
@nikoo28 Жыл бұрын
Wow, thank you!
@reactninja65672 жыл бұрын
Hands Down this is the best soln i have seen so far thanks! keep on going.
@avengersshorts59492 ай бұрын
3:33 I Completed solving this problem in leetcode thank you ❤
@saichaithrik71348 ай бұрын
Your way of teaching is one the best i have ever seen thank you sir
@supershinobi7892 Жыл бұрын
you have made my coding journey very easy and understandable
@ahmar8462Ай бұрын
On point and quick to grasp explanation. Keep posting
@souravsarkarofficials2 ай бұрын
Bhaiya apki samjhane ki tarika sach mei pura alag hei ...koi nhi rok sakta apko DSA mei 💪💪💪💪
@abhinavd2 Жыл бұрын
one of the best teacher ever studied😍
@kashikasinghal32502 ай бұрын
thank you for teaching the best and efficient approach. before watching this video i was struggling with the approach as mine took 336ms and the other videos were complex to understand, although it was only 5 min long but i couldn't get a loop;) nut this approach solved it in only 7ms...like this is crazy!
@TejwantDataLab2 ай бұрын
Thank you sir, really good explaination
@mohanupreti4654Ай бұрын
Very fine explanation
@UjjwalRaj-CSE-4 ай бұрын
I am watching your video first time, you are great
@TechnicalMasterAman Жыл бұрын
under if condition, we can just do swap(nums[i],nums[insertPos])
@deeptidip98642 жыл бұрын
Such an easy explanation💫
@ramielwan48 Жыл бұрын
Man I swear I asked chat gpt to explain it to me. I read the leetcode solution, and watched 2 other videos but none of them made sense to me. I wanted to understand how to approach it and not just copy and paste the solution. When you explained it, I was like damn that's easy 😅
@nikoo28 Жыл бұрын
That is so nice of you. :)
@vishwamitrasingh26672 ай бұрын
Great sir 🙏🙏🙏
@ajayupadhyay4964 Жыл бұрын
you are a really great teacher !!
@nikoo28 Жыл бұрын
Wow, thank you!
@LuckyAndDad Жыл бұрын
Thank you brother
@viveknamdev26058 ай бұрын
Nice Explanation by you
@jagratsahoo68852 ай бұрын
Thanks Nikhil
@khaleabhishek5023 Жыл бұрын
amazing keep going
@sammedpatil390711 ай бұрын
Very Nice Explanation
@nikoo2811 ай бұрын
Thanks and welcome
@dewanshanand13952 жыл бұрын
Amazing !!
@pulastyadas33512 жыл бұрын
You are really awesome❤
@shubhamkumar-um2xi7 ай бұрын
Great brother
@Sakeer89 Жыл бұрын
Very easy solution
@shubhamkumar-um2xi7 ай бұрын
Very nice
@vis20432 ай бұрын
Two pointer approach is also better one
@alexivuckovich80054 ай бұрын
Loving all the videos so far, but with this one it seems incorrect to say it's O(n) becuase the array is iterated over only once. I think it's actually of O(n) because it's simplified from O(2n) in the worst case that the array is all zeros. What about adding a line a code before inserttPosition is incremented that checks if i > insertPosition and just set the i-th element to zero then?
@nikoo284 ай бұрын
O(2n) simplifies to O(n)
@karthik-varma-15796 ай бұрын
nikhil awaiting for the sheet that you said will release!!!
@nikoo285 ай бұрын
Will release it soon
@tufanpondu9511 Жыл бұрын
Sir you make me bound to subscribe to your channel and give like.😍😍😍😍
@nikoo28 Жыл бұрын
glad to have you as my audience :)
@Vasoya_Jaydeep7 ай бұрын
This will take O(n + number of zeros) Time Here is one more solution with O(n) Time void moveZeroes(vector& nums) { int Pi =0 , Zi = 0; while(Pi < nums.size()) { if (nums[Zi] == 0) { while((Pi < nums.size()) && !nums[Pi]) { Pi++; } if (Pi >= nums.size()) break; int tmp = nums[Zi]; nums[Zi] = nums[Pi]; nums[Pi] = tmp; } Zi++; Pi++; } } /*End*/