I am confused, in Knapsack code, we did not use knapsack(values, weights, k), (we are not skipping the current value and moving on to i+1 right), what am I missing here? Could you tell me the intuition?
@mokochan4129Күн бұрын
Thanks for the video! In 4:56 you say, that there is no alternating path ending in B4, but there is one between a4 and b4, isn't that so?
@lucasdiehl73842 күн бұрын
last example is useless other than in this toy example, almost never values translate to indices in a array(in bound).
@lexkoal86572 күн бұрын
Sorry, but using x as a constant just doesn't feel okay 13:20
@chaos.n.dissonance2 күн бұрын
Thank you. I've been struggling to wrap my mind around ChatGPT's explanation of sliding window technique for a few days now, this is so much simpler. def count_vowels_efficientcode(word:str, k:int) -> int: VOWELS = set('aeiou') max_vowels:int = 0 n:int = len(word) if n <= k: for c in word: max_vowels += c in VOWELS return max_vowels for c in word[:k]: max_vowels += c in VOWELS cur_vowels:int = max_vowels for i in range(k,n): cur_vowels -= word[i-k] in VOWELS cur_vowels += word[i] in VOWELS max_vowels = max(max_vowels, cur_vowels) return max_vowels
@mallikarjuna99987 күн бұрын
absolutely smashed ... no words about your explanation
@prawnydagrate8 күн бұрын
WOW. I always expected making a Sudoku solver to be insanely complicated, but clearly not. I actually suck at solving Sudokus, but I'm planning on making a Sudoku solver for a school project, and this is perfect. I didn't expect to understand anything at all when I clicked on this video. I'm really surprised how easy this seems. I hope it is how it seems 🤞
@rishabhranjan51628 күн бұрын
I love these kind of explanations
@mfc87tech528 күн бұрын
Hello my friend, allah bless you, I could not find the course cause the link is broken
@RA-eg8tw8 күн бұрын
This was amazing! I actually understood the sudoku backtracking algorithm finally.
@Rishi-he7hs9 күн бұрын
You can alsow think in terms of relative velocity From the point of view of slow pointer, fast pointer is moving 1 node ahead at a time So if finally fast pointer reaches the slow one, then definitely there is a cycle I think, using the similar approach if you move slow pointer n times forward and the fast one (n+1) times forward, that should also work
@Bachelor05213 күн бұрын
Thanks!
@pavanbalu273417 күн бұрын
I think, In the end code slow and fast should point to arr[0] instead of just 0
@madhavkwatra588818 күн бұрын
Superb explanation , Thanks.
@DheerajKumar-fn4zq19 күн бұрын
I wasted a lot of time understanding it, thanks to this amazing video I finally understood :).
@playingwithmhdsulu78620 күн бұрын
Help full video thank you❤
@user-kp2uk3cg4g21 күн бұрын
Best video
@gimmametdeboys150523 күн бұрын
Really liked the tree visualtion, made it so much easier to understand.
@TABandiTA23 күн бұрын
Thanks a lot. We need more non-indian math/coding youtubers.
@ishajindal786223 күн бұрын
Hey. Could you please explain how to calculate the time complexity?
@vocipy206823 күн бұрын
Giving the mathematical explanation for getting the entry point of cycle was the best part !
@R_SinghRajput24 күн бұрын
Crazy explanation 🔥😎
@spiritgaming649924 күн бұрын
Amazing video
@nanon100427 күн бұрын
4 -> 6 -> 2 -> 7 -> 1 -> 3 -> 8 -> 5 -> 9 --- ^ | |___________________________| i hope the alignment is right but if not then basically 9 just points to 2 here. why is this not the graph at 9:15?
@anhduc091328 күн бұрын
How did you make videos like this? This is very informative and is great for visualising algorithms while also explaining the coding for it.
@chandrashekharmuradnar5681Ай бұрын
Very good stuff, thanks for the compiling this video.
@polishane8837Ай бұрын
Thank you so much, been looking for ways to make my multiplication more efficient
@w1thluvАй бұрын
Hello from Russia I am a first-year student at the university and we were asked to implement this method. I searched the entire Internet, but I could not understand this algorithm and how to implement it until I came across you. Such a clear and good explanation. Thank you very much!!
@grindinglcmeowАй бұрын
The math formula is straightforward but still, i'm like HOW DOES THEY JUST MEET when we do that starting point reset!
@duncancamilleri8614Ай бұрын
I found myself spending days on this - it feels so disappointing! Is this normal?? I got to try solve it(did not finish) in a longer approach too, probably inefficient - i feel defeated! I did not use backtracking. I seem to get confused with recursion every time despite having lots of experience! Is this normal? Is it possible to come up with this solution from the get go in 5 minutes if one has never done it before? Thank you for sharing this video - it's been very well explained - + 1 like and subscribe.
@mojisideАй бұрын
Thanks a lot 😊
@aakashs1806Ай бұрын
Does this work for bodies in 3D space?
@2casandeepsaran388Ай бұрын
My dear you tuber , First solve sudoku in paper and tell about algorithm for program THE ALGORITHM WILL NOT WORK #error
@rodrigoelias1987Ай бұрын
Nice content, dropping a like right now
@rodrigoelias1987Ай бұрын
here is a node solution for the exercise at the end of the video: import { strictEqual } from "assert"; const vowels = new Map([ ["a", "a"], ["e", "e"], ["i", "i"], ["o", "o"], ["u", "u"], ]); const isVowel = (v: string) => vowels.has(v); const countVowels = (string: string, span = 5) => { let vowelsCount = 0; let maxVowels = 0; for (let i = 0; i < string.length; i++) { if (i - span - 1 > -1) { if (isVowel(string[i - span - 1])) { vowelsCount--; } } if (isVowel(string[i])) { vowelsCount++; } if (vowelsCount > maxVowels) { maxVowels = vowelsCount; } } return maxVowels; }; const input = "bacacbefaobeacfe"; strictEqual( countVowels(input), 4, "The expected ammount of vowels was 4, got " + countVowels(input) );
@fluoriteАй бұрын
5:18 video was in full screen and i was thinking my laptop crashed...
@ort.schoolАй бұрын
perfect, sooo good. the best one i found. keep posting videos bro. ur are doing great !!!!!!
@tommyp713Ай бұрын
Thank you so much, this is a brilliant explanation
Пікірлер
I am confused, in Knapsack code, we did not use knapsack(values, weights, k), (we are not skipping the current value and moving on to i+1 right), what am I missing here? Could you tell me the intuition?
Thanks for the video! In 4:56 you say, that there is no alternating path ending in B4, but there is one between a4 and b4, isn't that so?
last example is useless other than in this toy example, almost never values translate to indices in a array(in bound).
Sorry, but using x as a constant just doesn't feel okay 13:20
Thank you. I've been struggling to wrap my mind around ChatGPT's explanation of sliding window technique for a few days now, this is so much simpler. def count_vowels_efficientcode(word:str, k:int) -> int: VOWELS = set('aeiou') max_vowels:int = 0 n:int = len(word) if n <= k: for c in word: max_vowels += c in VOWELS return max_vowels for c in word[:k]: max_vowels += c in VOWELS cur_vowels:int = max_vowels for i in range(k,n): cur_vowels -= word[i-k] in VOWELS cur_vowels += word[i] in VOWELS max_vowels = max(max_vowels, cur_vowels) return max_vowels
absolutely smashed ... no words about your explanation
WOW. I always expected making a Sudoku solver to be insanely complicated, but clearly not. I actually suck at solving Sudokus, but I'm planning on making a Sudoku solver for a school project, and this is perfect. I didn't expect to understand anything at all when I clicked on this video. I'm really surprised how easy this seems. I hope it is how it seems 🤞
I love these kind of explanations
Hello my friend, allah bless you, I could not find the course cause the link is broken
This was amazing! I actually understood the sudoku backtracking algorithm finally.
You can alsow think in terms of relative velocity From the point of view of slow pointer, fast pointer is moving 1 node ahead at a time So if finally fast pointer reaches the slow one, then definitely there is a cycle I think, using the similar approach if you move slow pointer n times forward and the fast one (n+1) times forward, that should also work
Thanks!
I think, In the end code slow and fast should point to arr[0] instead of just 0
Superb explanation , Thanks.
I wasted a lot of time understanding it, thanks to this amazing video I finally understood :).
Help full video thank you❤
Best video
Really liked the tree visualtion, made it so much easier to understand.
Thanks a lot. We need more non-indian math/coding youtubers.
Hey. Could you please explain how to calculate the time complexity?
Giving the mathematical explanation for getting the entry point of cycle was the best part !
Crazy explanation 🔥😎
Amazing video
4 -> 6 -> 2 -> 7 -> 1 -> 3 -> 8 -> 5 -> 9 --- ^ | |___________________________| i hope the alignment is right but if not then basically 9 just points to 2 here. why is this not the graph at 9:15?
How did you make videos like this? This is very informative and is great for visualising algorithms while also explaining the coding for it.
Very good stuff, thanks for the compiling this video.
Thank you so much, been looking for ways to make my multiplication more efficient
Hello from Russia I am a first-year student at the university and we were asked to implement this method. I searched the entire Internet, but I could not understand this algorithm and how to implement it until I came across you. Such a clear and good explanation. Thank you very much!!
The math formula is straightforward but still, i'm like HOW DOES THEY JUST MEET when we do that starting point reset!
I found myself spending days on this - it feels so disappointing! Is this normal?? I got to try solve it(did not finish) in a longer approach too, probably inefficient - i feel defeated! I did not use backtracking. I seem to get confused with recursion every time despite having lots of experience! Is this normal? Is it possible to come up with this solution from the get go in 5 minutes if one has never done it before? Thank you for sharing this video - it's been very well explained - + 1 like and subscribe.
Thanks a lot 😊
Does this work for bodies in 3D space?
My dear you tuber , First solve sudoku in paper and tell about algorithm for program THE ALGORITHM WILL NOT WORK #error
Nice content, dropping a like right now
here is a node solution for the exercise at the end of the video: import { strictEqual } from "assert"; const vowels = new Map([ ["a", "a"], ["e", "e"], ["i", "i"], ["o", "o"], ["u", "u"], ]); const isVowel = (v: string) => vowels.has(v); const countVowels = (string: string, span = 5) => { let vowelsCount = 0; let maxVowels = 0; for (let i = 0; i < string.length; i++) { if (i - span - 1 > -1) { if (isVowel(string[i - span - 1])) { vowelsCount--; } } if (isVowel(string[i])) { vowelsCount++; } if (vowelsCount > maxVowels) { maxVowels = vowelsCount; } } return maxVowels; }; const input = "bacacbefaobeacfe"; strictEqual( countVowels(input), 4, "The expected ammount of vowels was 4, got " + countVowels(input) );
5:18 video was in full screen and i was thinking my laptop crashed...
perfect, sooo good. the best one i found. keep posting videos bro. ur are doing great !!!!!!
Thank you so much, this is a brilliant explanation
you are genius <3
awesome video!
Nice man 👍 Thank u bro ♥️
Exactly what I was looking for Thanks !
Amazing way of presenting… it’s awesome
excellent presentation thank you
thanks
Thanks
Thanks
thanks
Thanks
Thanks