LeetCode 773 - Sliding Puzzle - Java
13:49
4 сағат бұрын
LeetCode 1975 - Maximum Matrix Sum - Java
9:41
LeetCode 1652 - Defuse the Bomb - Java
15:25
Пікірлер
@ShubhsNagar
@ShubhsNagar 8 күн бұрын
Simple and effective explanation and solution. Thanks!
@sasi.connect
@sasi.connect 9 күн бұрын
In line 12, what is the intuition behind "max(dist) * 100" ?
@sahebraojadhav9727
@sahebraojadhav9727 9 күн бұрын
Keep going🔥🔥
@pratiksalvi4901
@pratiksalvi4901 10 күн бұрын
I really enjoyed this format. Easier to understand the thought process behind the solution.
@zaeemashfaq4717
@zaeemashfaq4717 11 күн бұрын
Nice solution!
@vineethm6930
@vineethm6930 11 күн бұрын
Awesome explanation !!
@yingxu1694
@yingxu1694 14 күн бұрын
好聪明
@baophi2322
@baophi2322 18 күн бұрын
hey! Thank you for the video. But what's the intuition behind this? Is that just because you made up a large table and see the behavior that when index is 0 we fill nothing inside, when index is 1 you fill one 1 in and index is 2 you fill two 1s in and then you conclude that we have to fill n-1 1 into that given x? I really appreciate your response! Thank you
@Alpha-Code
@Alpha-Code 18 күн бұрын
Hey, yeah no problem. Intuition is two parts. 1. Every number has to have the bits in x set to one. 2. the slowest way to grow a number is to add one to it. Then from there you realize that we just grow the bits that are available from the smallest number possible (0) to n-1 since we are adding one every time. But since we just need the last number we can just get those bits for n-1 and place them in empty slots which will give us the answer.
@zweitekonto9654
@zweitekonto9654 20 күн бұрын
Tricky problem, took me a while to figure out.
@zweitekonto9654
@zweitekonto9654 20 күн бұрын
Tricky problem, took me a while to figure out.
@zweitekonto9654
@zweitekonto9654 22 күн бұрын
What's up with that thumbnail 💀
@Alpha-Code
@Alpha-Code 22 күн бұрын
that better lol? other image i had was wrong dimensions so got stretched out.
@B-Billy
@B-Billy 29 күн бұрын
So explanation is awesome!!! Thanks, Subscribed!
@sasi.connect
@sasi.connect Ай бұрын
After checking many videos, I found this one to be the best for this problem. Thanks for the detailed explanation
@dregun7057
@dregun7057 Ай бұрын
Why'd you stop? I used to watch your explanations daily even if I solved the questions myself. I found your solutions and their way of explaining to be very helpful. Please continue if you can... Thanks!
@Alpha-Code
@Alpha-Code Ай бұрын
Yeah, been busy last few weeks. Should get back to it starting next week most likely.
@Antinormanisto
@Antinormanisto Ай бұрын
The only reason why I'm here is not knowing what minimum absolute difference is
@3227998
@3227998 Ай бұрын
Thanks a lot! Great explanation. A general question: for someone struggling with questions involving operations with many indicies, do you there is a specific foundation that needs to be learned or it is matter of practicing and increasing one's working memory capacity? I am asking, because questions like this make me feel like trying to juggle many things simultaneously and getting confused with all the "moving parts"
@noaht9184
@noaht9184 Ай бұрын
Perfectly explained video, holy, thank you very much.
@em8136
@em8136 Ай бұрын
this explanation is so good
@vivek.tiwary
@vivek.tiwary Ай бұрын
Nice explanation, thanks
@bendakaya9912
@bendakaya9912 Ай бұрын
Thanks for the logic!
@PoRBvG
@PoRBvG Ай бұрын
when we flip the mask, do that mean we remove that character from the mask? how does it work? if we remove from it, then we break the substring to two substrings
@talwaarkidhaar
@talwaarkidhaar Ай бұрын
Awesome explanation... Especially, The part where, "Just after explaining the equations, you also take an example to illustrate it, instead of just messing around with variables." Thanks...
@qqw112
@qqw112 Ай бұрын
thanks for discussing all the possible solutions. it helps to see the problems from different sides.
@alifrahman7099
@alifrahman7099 Ай бұрын
goated
@anoops7974
@anoops7974 Ай бұрын
Thank youu
@asgarantony
@asgarantony Ай бұрын
The solution is straightforward, but I could never have come up with it myself.😢
@maniBrave
@maniBrave Ай бұрын
nice explanation
@arthurtancredi
@arthurtancredi Ай бұрын
Very good explanation. I was having a hard time understanding the prefix sum thing, thank you. I love that you use Excalidraw, it makes it very beautiful and readable. One note: mod still works fine for negative numbers. k mod p = k + n*p mod p, so adding or subtracting p is essentially the same as adding 0.
@Alpha-Code
@Alpha-Code Ай бұрын
I think this is language dependent, could be wrong. Mod of negative numbers gives different results in different languages I think.
@zweitekonto9654
@zweitekonto9654 Ай бұрын
Mod works fine. The language does not.
@arthurtancredi
@arthurtancredi Ай бұрын
Probably not works in Java then, I tested in Python and it works fine. But nice to know that I should be careful with that.
@Alpha-Code
@Alpha-Code Ай бұрын
@@arthurtancredi python negative mods work fine
@tamannasingh5672
@tamannasingh5672 Ай бұрын
Explained this code very well
@vinyasbharadwaj5630
@vinyasbharadwaj5630 Ай бұрын
loved the explanation 👍
@samrit9992
@samrit9992 Ай бұрын
awesome video :)
@eerav_koirala
@eerav_koirala Ай бұрын
thanks dude
@tomiczdarko
@tomiczdarko Ай бұрын
Way better solution than neetcode!
@asgarantony
@asgarantony 2 ай бұрын
the solution is amazing , you are doing a great job . I am following you for a while.🙌
@Alpha-Code
@Alpha-Code 2 ай бұрын
thx, glad to hear it.
@zweitekonto9654
@zweitekonto9654 2 ай бұрын
dude voice too low.
@-Alexey-
@-Alexey- 2 ай бұрын
Thank you, this is very clever implementation. PS Using the Integer[] cache will result in an impressive 6ms execution time.
@M0h1tKum4r
@M0h1tKum4r 2 ай бұрын
Great explanation man 👌, Loved it!
@jabedhasan21
@jabedhasan21 2 ай бұрын
This is the best and most cleaned and well-explained, Thank you so much for the excellent content. Subscribed
@crekso398
@crekso398 2 ай бұрын
it was really impressive solution
@hagverdiibrahimli8561
@hagverdiibrahimli8561 2 ай бұрын
The dedication is impressive. Keep up the good work.
@ShubhamSharma-sf8wk
@ShubhamSharma-sf8wk 2 ай бұрын
Great explanation
@asgarantony
@asgarantony 2 ай бұрын
doing a great job man , helping a. noobie like me .
@kristiyangerasimov6708
@kristiyangerasimov6708 2 ай бұрын
Subscribed. This is brutal! I can barely understand and follow the algorithm, even with chatgpt, the solution and a video explanation I'm still having difficulties understanding how to apply this approach to another problem like counting all occurrences of lowercase characters (a-z) in a given string. Masking is extremely powerful and is a must-have tool, so thank you for the video!
@beeam1791
@beeam1791 2 ай бұрын
Man, you rock! Thanks for all you're doing!
@KK-pz6xn
@KK-pz6xn 2 ай бұрын
nice solution!
@noaht9184
@noaht9184 2 ай бұрын
Thank you, you are a legend.
@SmoggyOwO
@SmoggyOwO 2 ай бұрын
Can you explain contest questions aswell?
@Alpha-Code
@Alpha-Code 2 ай бұрын
Gonna take a break from doing videos for those and easy problems I think. Easies don't really need a video and contests is just too many weekly problems with the work I currently have.
@SmoggyOwO
@SmoggyOwO 2 ай бұрын
@@Alpha-Code i see nevertheless i appreciate your consistency in uploading the videos everyday for free
@SmoggyOwO
@SmoggyOwO 2 ай бұрын
I just realised, you use Ai to generate your thumbnails right?
@Alpha-Code
@Alpha-Code 2 ай бұрын
yes
@BlackLightning73
@BlackLightning73 2 ай бұрын
I had an interesting problem where I accidentally derived this algorithm. The question was to place each number of an input array into one of 2 arrays as you go, depending on which of the 2 arrays had more elements strictly greater than the current number at the time. I tracked a sorted version of each array, comparing the bisect.bisect_right index relative to the size of the array to get the strictly greater than count and then using bisect.insort to insert into the appropriate sorted array. The funny thing is I did that recently and didn't see the application it had to this problem haha
@sahilshah4698
@sahilshah4698 2 ай бұрын
Love your videos, please make videos daily