- 837
- 136 086
Alpha-Code
Приєднався 16 тра 2023
Channel for coding interview questions.
LeetCode 2381 - Shifting Letters II - Go
Solution, explanation, and complexity analysis for LeetCode 2381 in Go
Problem Description:
leetcode.com/problems/shifting-letters-ii/
Code:
github.com/AnatoliySokolov98/LeetCode/tree/main/2381
Problem Description:
leetcode.com/problems/shifting-letters-ii/
Code:
github.com/AnatoliySokolov98/LeetCode/tree/main/2381
Переглядів: 30
Відео
LeetCode 1930 - Unique Length-3 Palindromic Subsequences - Go
Переглядів 292 години тому
Solution, explanation, and complexity analysis for LeetCode 1930 in Go Problem Description: leetcode.com/problems/unique-length-3-palindromic-subsequences Code: github.com/AnatoliySokolov98/LeetCode/tree/main/1930
LeetCode 2270 - Number of Ways to Split Array - Go
Переглядів 384 години тому
Solution, explanation, and complexity analysis for LeetCode 2270 in Go Problem Description: leetcode.com/problems/number-of-ways-to-split-array Code: github.com/AnatoliySokolov98/LeetCode/tree/main/2270
LeetCode 983 - Minumum Cost For Tickets - Go
Переглядів 6312 годин тому
Solution, explanation, and complexity analysis for LeetCode 983 in Go Problem Description: leetcode.com/problems/minimum-cost-for-tickets Code: github.com/AnatoliySokolov98/LeetCode/tree/main/0983
LeetCode 2466 - Count Ways to Build Good Strings - Go
Переглядів 5714 годин тому
Solution, explanation, and complexity analysis for LeetCode 2466 in Go Problem Description: leetcode.com/problems/count-ways-to-build-good-strings Code: github.com/AnatoliySokolov98/LeetCode/tree/main/1639
LeetCode 1639 - Number of Ways to Form a Target String Given a Dictionary - Go
Переглядів 10116 годин тому
Solution, explanation, and complexity analysis for LeetCode 1639 in Go Problem Description: leetcode.com/problems/number-of-ways-to-form-a-target-string-given-a-dictionary Code: github.com/AnatoliySokolov98/LeetCode/tree/main/1639
LeetCode 689 - Maximum Sum of Nonoverlapping Subarrays - Python
Переглядів 9519 годин тому
Solution, explanation, and complexity analysis for LeetCode 689in Python Problem Description: leetcode.com/problems/maximum-sum-of-3-non-overlapping-subarrays Code: github.com/AnatoliySokolov98/LeetCode/tree/main/0689
LeetCode 1014 - Best Sightseeing Pair - Go
Переглядів 3621 годину тому
Solution, explanation, and complexity analysis for LeetCode 1014 in Go Problem Description: leetcode.com/problems/best-sightseeing-pair Code: github.com/AnatoliySokolov98/LeetCode/tree/main/1014
LeetCode 2290 - Minimal Obstacle Removal to Reach Corner - Java
Переглядів 145Місяць тому
Solution, explanation, and complexity analysis for LeetCode 2290 in Java Problem Description: leetcode.com/problems/minimum-obstacle-removal-to-reach-corner/ Code: github.com/AnatoliySokolov98/LeetCode/tree/main/2290
LeetCode 3243 - Shortest Distance After Road Addition Queries I - Java
Переглядів 79Місяць тому
Solution, explanation, and complexity analysis for LeetCode 3243 in Java Problem Description: leetcode.com/problems/shortest-distance-after-road-addition-queries-i Code: github.com/AnatoliySokolov98/LeetCode/tree/main/3243
LeetCode 773 - Sliding Puzzle - Java
Переглядів 137Місяць тому
Solution, explanation, and complexity analysis for LeetCode 773 Problem Description: leetcode.com/problems/sliding-puzzle Code: github.com/AnatoliySokolov98/LeetCode/tree/main/0773
LeetCode 1975 - Maximum Matrix Sum - Java
Переглядів 139Місяць тому
Solution, explanation, and complexity for LeetCode 1975 in Java Problem Description: leetcode.com/problems/maximum-matrix-sum Code: github.com/AnatoliySokolov98/LeetCode/tree/main/1975
LeetCode 2257 - Count Unguarded Cells in the Grid - Java
Переглядів 141Місяць тому
Solution, explanation, and complexity for LeetCode 2257 in Java Problem Description: leetcode.com/problems/count-unguarded-cells-in-the-grid Code: github.com/AnatoliySokolov98/LeetCode/tree/main/2257
LeetCode 2516 - Take K of Each Character From Left and Right - Java
Переглядів 140Місяць тому
Solution, explanation, and complexity analysis for LeetCode 2516 in Java Problem Description: leetcode.com/problems/take-k-of-each-character-from-left-and-right Code: github.com/AnatoliySokolov98/LeetCode/tree/main/2516
LeetCode 2461 - Maximum Sum of of Distinct Subarrays of Length K - Java
Переглядів 142Місяць тому
Solution, explanation, and complexity analysis for LeetCode 2461 in Java Problem Description: leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k Code: github.com/AnatoliySokolov98/LeetCode/tree/main/2461
LeetCode 1652 - Defuse the Bomb - Java
Переглядів 134Місяць тому
LeetCode 1652 - Defuse the Bomb - Java
LeetCode 862 - Shortest Subarray with Sum at Least K - Java
Переглядів 287Місяць тому
LeetCode 862 - Shortest Subarray with Sum at Least K - Java
LeetCode 3254 - Find the Power of K-Sized Subarrays I - Java
Переглядів 64Місяць тому
LeetCode 3254 - Find the Power of K-Sized Subarrays I - Java
LeetCode 2064 - Minimized Maximum of Products Distributed to Any Store - Java
Переглядів 69Місяць тому
LeetCode 2064 - Minimized Maximum of Products Distributed to Any Store - Java
LeetCode 2070 - Most Beautiful Item in Each Query - Java
Переглядів 116Місяць тому
LeetCode 2070 - Most Beautiful Item in Each Query - Java
LeetCode 2601 - Prime Subtraction Operation - Java
Переглядів 112Місяць тому
LeetCode 2601 - Prime Subtraction Operation - Java
LeetCode 3097 Shortest Subarray With OR at Least K II - Java
Переглядів 257Місяць тому
LeetCode 3097 Shortest Subarray With OR at Least K II - Java
LeetCode 3133 - Minimum Array End - Java
Переглядів 93Місяць тому
LeetCode 3133 - Minimum Array End - Java
LeetCode 1829 - Maximum XOR For Each Query - Java
Переглядів 108Місяць тому
LeetCode 1829 - Maximum XOR For Each Query - Java
LeetCode 2275 - Largest Combination With Bitwise And Greater Than Zero - Java
Переглядів 44Місяць тому
LeetCode 2275 - Largest Combination With Bitwise And Greater Than Zero - Java
LeetCode 3011 - Find if Array Can Be Sorted - Java
Переглядів 119Місяць тому
LeetCode 3011 - Find if Array Can Be Sorted - Java
LeetCode 2914 - Minimum Number of Changes to Make Binary String Beautiful - Java
Переглядів 762 місяці тому
LeetCode 2914 - Minimum Number of Changes to Make Binary String Beautiful - Java
LeetCode 1671 - Minimum Number of Removals to Make Mountain Array - Java
Переглядів 1682 місяці тому
LeetCode 1671 - Minimum Number of Removals to Make Mountain Array - Java
LeetCode 2501 - Longest Square Streak in an Array - Java
Переглядів 1422 місяці тому
LeetCode 2501 - Longest Square Streak in an Array - Java
LeetCode 2938 - Separate Black and White Balls - Java
Переглядів 882 місяці тому
LeetCode 2938 - Separate Black and White Balls - Java
bro what motivates you every day?
I actually enjoy puzzle solving I guess. Once you get good at it, it's not a chore.
@@Alpha-Code hats off you my dear your consistency is amazing. personally, I feel bad for you, because after this much consistency, you didn’t get subs
@@Alpha-Code I can give one suggestion to you. Why don’t you start teaching DSA? I mean, you should upload concepts around advance DP graph recursion. This might help you a lot.
@@sahebraojadhav9727 Might consider this in the future, but my main goals with having this channel were getting good at DSA myself and getting a good job which I achieved. The sub count would be nice but isnt a high priority issue.
@@Alpha-Code can we connect on socials
explained beautifully !! Thanks dude
Back in business 🎉
very good explanation. thank you!
Such a beautiful solution! Subscribed to your channel)
The video could've been slightly more edited for the sake of the length, but the explanation itself was super clear for me, thank you!
Why bro videos are stopped 😞
very clean explanation !
bro code while teaching it helps a lot , please
nice explanation
Loved the explanation
Simple and effective explanation and solution. Thanks!
In line 12, what is the intuition behind "max(dist) * 100" ?
Keep going🔥🔥
I really enjoyed this format. Easier to understand the thought process behind the solution.
Nice solution!
Awesome explanation !!
好聪明
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
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.
Tricky problem, took me a while to figure out.
Tricky problem, took me a while to figure out.
What's up with that thumbnail 💀
that better lol? other image i had was wrong dimensions so got stretched out.
So explanation is awesome!!! Thanks, Subscribed!
After checking many videos, I found this one to be the best for this problem. Thanks for the detailed explanation
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!
Yeah, been busy last few weeks. Should get back to it starting next week most likely.
The only reason why I'm here is not knowing what minimum absolute difference is
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"
Perfectly explained video, holy, thank you very much.
this explanation is so good
Nice explanation, thanks
Thanks for the logic!
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
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...
thanks for discussing all the possible solutions. it helps to see the problems from different sides.
goated
Thank youu
The solution is straightforward, but I could never have come up with it myself.😢
nice explanation
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.
I think this is language dependent, could be wrong. Mod of negative numbers gives different results in different languages I think.
Mod works fine. The language does not.
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.
@@arthurtancredi python negative mods work fine
Explained this code very well
loved the explanation 👍
awesome video :)
thanks dude
Way better solution than neetcode!
the solution is amazing , you are doing a great job . I am following you for a while.🙌
thx, glad to hear it.
dude voice too low.
Thank you, this is very clever implementation. PS Using the Integer[] cache will result in an impressive 6ms execution time.
Great explanation man 👌, Loved it!
This is the best and most cleaned and well-explained, Thank you so much for the excellent content. Subscribed
it was really impressive solution