I can see the hard work in this video. There were few videos only for this problem on KZbin which i tried watching in the morning. They wasted my time. And this legend makes a video of 1 hour to clear all my doubts . Guruji 🙏🏻🙏🏻🙏🏻 aap kamaal ho
@SlapB0X5 ай бұрын
For the first time, I could solve a Hard question in 15 minutes myself. And like you said, it was only possible because I had solved a similar question before. In the biweekly, there was a similar question where k was fixed = 3. I figured it out during the contest that it's greedy approach. Even in this question, I instantly knew it was greedy. Now, to tackle with variable "k" , I had solved a similar question using "Scanline Algorithm" and instantly I knew how to tackle with "k" . The final solution consisted of combining these two, and I had already solved similar questions before, this hard became literally easy-medium.
@gauravbhatt65815 ай бұрын
Tried other KZbinrs videos on this topic, couldn't understand, here you cleared everything
@Zomb-zj4ip5 ай бұрын
bhai tussi great ho . thank you
@gui-codes5 ай бұрын
subah se pareshan tha. I watched Larry's video but kuch samajh nahi aya. Finally I understood each and every point. thanks a lot . I will also say -> NETFLIX ❌ MIK Lengthy video 💚
@aws_handles5 ай бұрын
Larry ka nai samajh aata . But banda legend corer hai
@adsnehi5 ай бұрын
I love netfflix, DSA is very painful for my brain
@newglobal72715 ай бұрын
@@adsnehi 😂😂😂😂🤣🤣
@gui-codes4 ай бұрын
@@adsnehi 🤣
@akshayyn4 ай бұрын
I love your explanations! The way you slowly build up intuition from examples really helps. Most other videos just go over the top solutions, without getting into the intuition, which may lead to memorizing solutions.
@shreyabajaj45885 ай бұрын
Oohh thanks a lot for such a clear explanation.....❤ ignore the people who all are saying vdo is lengthy....if they got the concept at the starting they can even do it by themselves rather then complaining
@Dungeon5505 ай бұрын
Only Mik can make this Hard question's explaination an easy one
@aws_handles5 ай бұрын
I believe no one has the patience to cover even every minute points in the explanation . Hats off to you
@b_01_aditidonode435 ай бұрын
Enjoyed learning the intuition of this problem a lot and the best part is that all the three approaches were beautifully connected, now this hard level prob also feels like a cakewalk!! thanks a lot!!
@j2f425 ай бұрын
very very nice explanation than all others whom i warched this. thanks keep it up
@raunakgiri50335 ай бұрын
Watched till 25:15 , then i was able to do it by my own. Thanks for helping me building the intuition.
Excellent explanation of how to use the isFlipped array bhaiya!!! Thanks... I was stuck on this question for a long time!! Please keep uploading
@nexus1985 ай бұрын
Awesome explanation! Keep it up.
@ugcwithaddi5 ай бұрын
Wow. Solving leetcode 3191 was insane 😮
@gauravbanerjee28985 ай бұрын
Jeetu Bhaiya from Kota Factory == MIK Bhaiya from DSA Industry ❤️❤️ Thank you so much bhaiya itna time leke itna easily samjhane k liye ❤️ And those who are saying why 1 hour long video, guys please understand it is impossible for bhaiya to explain in this much details with multiple dry runs within 15-20 mins. If you don't have time to watch a 1 hour long video and want to solve a leetcode hard problem just for the sake of maintaining a streak then don't do it . Belive me 1 hour deke dekho regret nahi karoge 😊💯
@gui-codes4 ай бұрын
bhai tumhara ye comment instagram and linkedIn me kaafi reach me ja raha hai. MIK posted about this comment 👍
@ravirathore67175 ай бұрын
Very nice explanation sir❤
@AryanRaj-mz4ty5 ай бұрын
great explanation
@nikhilhaspe27345 ай бұрын
Bro your contribution is amazing! matlab ye video recording he 1 Hr ka hai to preparation aur apko samajhane me kitna samay aur efforts lage hoge. Hats Bro!! 🗿
@dipakjadhav15795 ай бұрын
No one on this KZbin platform , i understand this problem from them but after seeing this video of MIK Bhaiya it is in very interesting way he solved that and I learnt from him
@yashkalia23115 ай бұрын
i made it myself thankfulllyyyy!!!
@GR8_Impact5 ай бұрын
I solved LC Contest Question with Bruteforce during contest as value of k was 3 :)
@girishkumar88945 ай бұрын
Thank you so much 🙏
@iWontFakeIt5 ай бұрын
love u guruji!
@parvahuja76185 ай бұрын
thankyou so much bhaii
@literally_ankur5 ай бұрын
Absolute cinema
@bunnypubg34755 ай бұрын
Kya baat hai sir, sochraha hu apna bhi ek channel khol lun, padhane se khud ko bhi zyda smjh ata hoga… aap Konsi company mei ho?
@VaibhavChawla-lz4fi5 ай бұрын
Hats off bhai🫡
@nikhilaggarwal93255 ай бұрын
Great explanation
@thekindspill5 ай бұрын
Insane explanation 😳🔥 And 38:13 was awesome 🙌
@asadneyaz23175 ай бұрын
Please make videos of contest upsolve
@riyasahu73735 ай бұрын
Thanks mik, for such a detailed video, can you also pls discuss the solution for leetcode 3192.
@englishbetz67485 ай бұрын
bhai ho sake to brute force bhi explain kiya kro taki jo new log h logic banane ka try kr rhe h unko bhi samjh aye chize acche se.
@pokeindia53615 ай бұрын
Bhaiya *longest valid parantheses* important q h please video banaiye aapne bola tha ki weekend par banaunga
@A_Myth9635 ай бұрын
we can also use if( (nums[i] + flipcnt ) % 2 == 0) then we will flip
@atharvachikhale73385 ай бұрын
imp dry run 19:52
@nawazthezaifre88705 ай бұрын
Sir, everything was good but please make a length video shorter.
@atheisth23735 ай бұрын
Kya ye ques hard tha ...No is video ke baad , not at all , it was super easy....
@gsgpavan18975 ай бұрын
Hi MIK, I have a doubt regarding approach 3. Why we have used deque instead of queue. Is there any particular reason for using deque because both enqueue and dequeue operations in both queue and deque take same time O(1)..
@manimanohar_0015 ай бұрын
Bor bit manipulation playlist pls😎🙏
@tanishkumar66822 ай бұрын
how are we sure that the the way we are flipping the bits (means choosing the leftmost 0 at every step) will give the minimum number of moves. Can you please explain that bcz i searched on youtube but i did not got any satisfying answer.
@nileshtiwari41435 ай бұрын
class Solution { public: int minKBitFlips(vector& nums, int k) { int count = 0; int n = nums.size(); for (int i = 0; i < n; i++) { if (nums[i] == 0) { //check kya i+k > n ho gya hai tb -1 return kr do if (i + k > n) return -1; for (int j = 0; j < k; j++) { nums[i + j] ^= 1; } count++; } } // check humara sara nums 1 ho gya hai kya for (int i = 0; i < n; i++) { if (nums[i] == 0) return -1; } return count; } }; mik bhaia brute force approach🙏🙏🙏🙏
@priyanshkumar175 ай бұрын
Bhaiya, Approach-2 mai aapne nums ko hii modify kiya hai, toh vo bhi toh space complexity mai count hona chahiye naa ? isFlipped nhi liya lekin data tamper kiya hai, toh space used should also be O(n) in approach-2
@adityaraj-zm7zk5 ай бұрын
bhaiya please provide slides in all the next question please
@chitranshjain97145 ай бұрын
Bhaiya aap dp concept? Kab start karenge
@madhurverma12085 ай бұрын
Minimum Operations to Make Binary Array Elements Equal to One II , can we solve this with same approach ??
@Abhishek-y6i3j5 ай бұрын
bro i am following you for very long time , but one suggestion of mine is don't make too much large video you can explain the logic by one good testcase . We can not spent 1 hrs for one question so please try to make it as short as you can .
@codestorywithMIK5 ай бұрын
Sure I will try to reduce 😇❤️🙏
@kapilnitb5 ай бұрын
@@codestorywithMIK esa kr skte ho ki normal km length ke hisab se explain krdo aur fir 10-15min ka detail dry run dal do sath me jinko detailed chahiye aur jinko normal chahiye vo skip kr lenge aur video me bta bhi dena if you have less time you can skip. sayad aap smaj pa rhe ho ki me kya bolna chah rha
@Abhishek-y6i3j5 ай бұрын
@@codestorywithMIK thanks 😇
@gui-codes5 ай бұрын
COPIED FROM VIDEO DESCRIPTION ✨ Timelines✨ 00:00 - Introduction 00:55 - Problem Explanation 06:57 - Thought Process Approach-1 44:05 - Coding Approach-1 46:23 - Approach-2 49:52 - Coding Approach-2 50:43 - Approach-3 01:00:03 - Coding Approach-3 01:02:03 - Solving Leetcode 3191. Minimum Operations to Make Binary Array Elements Equal to One I
@Abhay145 ай бұрын
TLE (burite force) class Solution { public: int solve(vector&nums, int i, int temp){ while(i < temp){ nums[i] = 1-nums[i]; i++; } return 1; } int minKBitFlips(vector& nums, int k) { int count = 0; for(int i=0; i
@ujjwalsharma67735 ай бұрын
Why is it always google asking these kinda problems🙃
@sanjai_rs75 ай бұрын
Can you do it in English?
@devlpr-nitish5 ай бұрын
❤❤
@tusharnanda38855 ай бұрын
class Solution { public: int minKBitFlips(vector& nums, int k) { int n = nums.size(); vector pre(n+2 , 0); int i = 1, j = k; int ans = 0; while( j
@dayashankarlakhotia49435 ай бұрын
it is modified problem of leetcode 3191&3192?🎉❤
@codestorywithMIK5 ай бұрын
Indeed. I have solved 3191 in the end of this video ❤️❤️❤️
i was able to come up with brute force only // Brute Force void toggleBit(vector &nums, int temp) { if (nums[temp] == 0) nums[temp] = 1; else nums[temp] = 0; } int minKBitFlips(vector &nums, int k) { int i = 0, j = i + k - 1, count = 0; while (j < nums.size()) { if (nums[i] == 0) { int temp = i; count++; while (temp
@ara33685 ай бұрын
No need to create toggle function. For toggling use: nums[i] = 1 - nums[i]
@ishowclipsss075 ай бұрын
bhai 20-30 min max rakho video length
@gui-codes5 ай бұрын
lengthy - more details and more to learn.
@ishowclipsss075 ай бұрын
@@gui-codes 🙏🙏par 1 hour bahut jyada hai bhai 30 min should be max
@kartikforwork5 ай бұрын
nope as detailed as possible, new logo ko kafi help hoti h. aur 2-3 approach me ye expected h bor
@jeehub0415 ай бұрын
Sir ye question thoda dimaag ghuma dia. 😢
@VS-rc4fs5 ай бұрын
Bhaiya.. Itni lambi lambi video na banao plss😢
@harshtiwari4165 ай бұрын
Badi video mein hi clear hota
@manimanohar_0015 ай бұрын
Bro Jo content hoga vohi toh banayenge aur HARD bhi toh hai question 😊