Count Ways To Build Good Strings | BOTTOM UP | META | Leetcode-2466 | Live Code + Explanation

  Рет қаралды 1,390

codestorywithMIK

codestorywithMIK

Күн бұрын

Пікірлер: 28
@JJ-tp2dd
@JJ-tp2dd Жыл бұрын
Just unbelievable bhai..magical ♥💙 . Java implementation: class Solution { public int countGoodStrings(int low, int high, int zero, int one) { int mod = 1000000007; //t[i] == number of good strings of length i int [] t = new int[high+1]; t[0] = 1; // "" for(int i=1; i= 0) t[i] = (t[i]%mod + t[i-zero]%mod)%mod; if(i-one >=0) t[i] = (t[i]%mod + t[i-one]%mod)%mod; } int ans = 0; for(int l=low; l
@codestorywithMIK
@codestorywithMIK Жыл бұрын
❤️❤️
@Your_Boy_Suraj
@Your_Boy_Suraj Жыл бұрын
Bhai Jaisa Graph Series ko Scratch se padhaya waise hi please ek Tree series bhi bana do na and Ryan ki baate include karna bilkul mat bhulna, usse energy level maintain rehta hai!! Thank you for the Graph series... Kaafi underrated content hai and ye channel bhi❤
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Sure Suraj Thank you so much for watching ❤️❤️❤️
@JJ-tp2dd
@JJ-tp2dd Жыл бұрын
really looking forward to your dp concepts series. Ek suggestion/request h.. Jb ap concepts smjhaoge dp series me and then us concept pe question karaoge toh please 9-10 similar pattern k question link kr dena ya question no comment me dena so that practice ho paye..🥺🥺
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Sure thing ❤️❤️
@sanjaykatta6499
@sanjaykatta6499 11 ай бұрын
Bro, will there be a situation where the interviewer specifically asks for bottom up approach? Is this just to know another approach apart from top down and or does this have any added advantage? Because somehow I feel top down approach is more intuitive than the bottom up.
@sunnyvlogs__
@sunnyvlogs__ Жыл бұрын
Bhaiya In interviews Top-down (recur+memo) is sufficient or we need to practice Bottom up as well?
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Bottom up has been increasingly become important for interviews of Top tech companies.
@sanjaykatta6499
@sanjaykatta6499 11 ай бұрын
For Viewers - switch to 1.5x for better experience!
@codestorywithMIK
@codestorywithMIK 11 ай бұрын
Thank you ❤️😇🙏
@YashMalav-kh1ov
@YashMalav-kh1ov 4 ай бұрын
Bhaiya jbb ham t[0] = 1 le rhe hai means zero length kitni good strings to it show have followed naa ki uski len mtlb zero low aur high ke bich ho tbb hi apn t[0] kr skte hai??
@ManojKrVerma-vw4dx
@ManojKrVerma-vw4dx Жыл бұрын
First if case mei rvalue mei t[i] ki need kya hain?
@codestorywithMIK
@codestorywithMIK Жыл бұрын
you can skip it since it’s the first if condition.
@venkatarohitpotnuru38
@venkatarohitpotnuru38 3 ай бұрын
Supper
@satyamkumaryadav1560
@satyamkumaryadav1560 Жыл бұрын
sir i have one simple doubt aap empty string ko as a good string count kr rahe jaise t[0]=1 toh t[1]=2 hona chaiye us logic se please clear this doubt
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Actually if you remember I told that if we set t[0] = 1 Then whole array will be 0 till the end. Sometimes there are questions where we do something like this. One similar Qn is Minumum Subset Sum in DP bottom up. I will be starting DP concepts playlist where I will be teaching all these things too
@satyamkumaryadav1560
@satyamkumaryadav1560 Жыл бұрын
@@codestorywithMIK sir please start asap in 2-3 months we will be having our placement month so it will be very kind of you if you start soon , because there are small concepts like this which we lack and are unable to solve problems
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Sure thing ❤️❤️
@yashgarg3027
@yashgarg3027 Жыл бұрын
Bhaiya plz 1 request next aaj 1 video upload kr do on today biweekly leetcode contest 3 question maximum xor
@codestorywithMIK
@codestorywithMIK Жыл бұрын
Hi Yash, Actually i am spending most of my time today with my mom celebrating Mother’s. I will definitely come up with the video soon for that. Thank you for trusting my channel and the patience ❤️❤️
@souravjoshi2293
@souravjoshi2293 Жыл бұрын
L.E.G.E.N.D
@codeandtalk6
@codeandtalk6 Жыл бұрын
@wearevacationuncoverers
@wearevacationuncoverers Жыл бұрын
Dude, when do you rest ? Weekends (I don't think so)
@ManojKrVerma-vw4dx
@ManojKrVerma-vw4dx Жыл бұрын
Coders never rest. Its a habit not compulsion
@souravjoshi2293
@souravjoshi2293 Жыл бұрын
@@ManojKrVerma-vw4dx True
@Brute_Coder
@Brute_Coder Жыл бұрын
can anyone help me to debug this code ?? class Solution { int mod = 1000000007; public int countGoodStrings(int low, int high, int zero, int one) { int[] dp = new int[high+1]; Arrays.fill(dp,0); dp[0] = 1; for(int i = 1;i= 0) ? dp[i-zero] : 0; int foro = ((i-one) >= 0) ? dp[i-one] : 0; dp[i] = forz%mod + foro%mod; } int ans = 0 ; for(int i = low ;i
@unknown47896
@unknown47896 4 ай бұрын
ask chatgpt
Ouch.. 🤕⚽️
00:25
Celine Dept
Рет қаралды 21 МЛН
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 26 МЛН
Smart Sigma Kid #funny #sigma
00:14
CRAZY GREAPA
Рет қаралды 58 МЛН