- 18
- 1 963
codegrind
Приєднався 16 вер 2024
Leetcode tutorials written in python. Step by step coding solutions, from easy to hard, always explained simply.
Minimum Number of Operations to Move All Balls to Each Box -- Python || LeetCode 1769
0:00 - 0:42 Problem Statement
0:42 - 2:39 Understanding the Problem and Brute force O(n^2)
2:39 - 6:41 Intuition for O(n)
6:41 - 8:32 Coding
8:32 - 9:04 Concluding statements
Link to Discord:
discord.gg/DUhr2pStxs
Link to code:
leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/solutions/6241124/video-with-easy-explanation-codegrind-on-kdoz/
#python #leetcode #codinginterview #coding #codingtutorial #grind75 #blind75 #neetcode150
0:42 - 2:39 Understanding the Problem and Brute force O(n^2)
2:39 - 6:41 Intuition for O(n)
6:41 - 8:32 Coding
8:32 - 9:04 Concluding statements
Link to Discord:
discord.gg/DUhr2pStxs
Link to code:
leetcode.com/problems/minimum-number-of-operations-to-move-all-balls-to-each-box/solutions/6241124/video-with-easy-explanation-codegrind-on-kdoz/
#python #leetcode #codinginterview #coding #codingtutorial #grind75 #blind75 #neetcode150
Переглядів: 23
Відео
Unique Length-3 Palindromic Subsequences - Python || LeetCode 1930
Переглядів 419 годин тому
0:00 - 0:26 Problem Statement 0:26 - 1:00 Understanding the Problem 1:00 - 3:30 Approach 3:30 - 5:30 Coding 5:30 - 5:48 Outro Link to Discord: discord.gg/DUhr2pStxs Link to code: #python #leetcode #codinginterview #coding #codingtutorial #grind75 #blind75 #neetcode150
Number of Ways to Split Array - Python || O(n) time & O(1) space || LeetCode 2270
Переглядів 6112 годин тому
0:00 - 0:28 Problem Statement 0:28 - 1:45 Understanding the Problem 1:45 - 2:10 Explaining Solution 2:10 - 2:53 Coding 2:53 - 3:01 Outro Link to Discord: discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/number-of-ways-to-split-array/solutions/6220755/video-with-easy-explanation-codegrind-on-jmia/ #python #leetcode #codinginterview #coding #codingtutorial #grind75 #blind75 #neetcode150
Count Vowel Strings in Ranges - Python || O(n) solution || LeetCode Daily 2559
Переглядів 3414 годин тому
0:00 - 0:23 Problem Statement 0:23 - 1:05 Understanding the Problem 1:30 - 2:09 Transforming the Problem 2:09 - 3:15 Limitiations and Constraints 3:15 - 3:46 Coding O(n^2) 3:46 - 5:53 Drawing O(n) Solution 5:53 - 6:43 Coding O(n) Solution 6:43 - 7:02 Outro Link to Discord: discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/count-vowel-strings-in-ranges/solutions/6219539/video-with-easy-e...
Shortest Distance After Road Addition Queries - Python || LeetCode Daily || LeetCode 3243
Переглядів 12Місяць тому
0:00 - 0:44 Problem statement 0:44 - 1:46 Understanding the problem 1:46 - 6:07 Visualizating the problem 6:07 - 8:31 Coding 8:31 - 9:42 Conclusion Link to Discord: discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/shortest-distance-after-road-addition-queries-i/solutions/6119882/video-with-easy-explanation-codegrind-dynamic-programming-approach/ #coding python #leetcode #codingintervie...
Rotating the Box-Python || LeetCode 1861 || LeetCode daily question
Переглядів 299Місяць тому
0:00 - 1:30 Understanding the problem 1:30 - 3:06 Visualizing rotations 3:30 - 4:32 Coding 5:02 - 6:28 Visualizing falling stones 8:09 - 10:53 Coding falling stones 10:53 - 11:17 Conclusion Link to Discord: discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/rotating-the-box/solutions/6076651/video-with-easy-explanation-codegrind/ #python #leetcode #leetcodedaily #codinginterview #coding ...
Alien Dictionary - Python || Leetcode 269 || Topological Sort
Переглядів 164Місяць тому
0:00 - 0:30 Problem statement 0:30 - 1:34 Understanding the problem 1:34 - 3:30 Visualization and objective 3:30 - 5:02 Working through example 1 5:02 - 8:09 Coding topological sort 8:09 - 9:15 Coding edge cases 9:15 - 9:33 Conclusion Link to Discord: discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/alien-dictionary/solutions/6072455/video-with-easy-explanation-codegrind-faster-then-10...
Course Schedule - Python || LeetCode 207 || Topological Sort using Kahn's Algorithm(Cycle Detection)
Переглядів 184Місяць тому
0:00 - 0:28 Problem statement 0:28 - 0:49 Understanding the problem 0:49 - 1:43 Visualization and objective 1:43 - 4:32 Kahn's Algorithms 4:32 - 7:09 Coding 7:09 - 9:38 Conclusion Link to Discord: discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/course-schedule/solutions/6048357/video-with-easy-explanation-codegrind-topological-sort-using-kahn-s-algorithm/ #python #leetcode #codinginte...
Longest Palindromic Substring - Python || LeetCode 5 || Two Pointer Approach
Переглядів 1402 місяці тому
0:00 - 0:05 Problem statement 0:05 - 3:18 Visualization and understanding the problem 3:18 - 4:14 Runtime analysis 4:14 - 9:21 Coding 9:21 - 9:38 Conclusion Join our discord! Discord: discord.gg/tVksgNjG Link to code: leetcode.com/problems/longest-palindromic-substring/solutions/6015745/video-with-simple-explanation-codegrind-2-pointer-approach/ #python #leetcode #codinginterview #coding #codin...
House Robber - Python || Leetcode 39 || Dynamic Programming Approach
Переглядів 1492 місяці тому
0:00 - 0:25 Problem statement 0:25 - 5:14 Visualization and understanding the problem 5:14 - 8:29 Coding 8:29 - 8:42 Conclusion Join our discord! discord.gg/DUhr2pStxs Link to code: leetcode.com/problems/house-robber/solutions/5993921/video-with-easy-explanation-codegrind-faster-then-100-dynamic-programming-solution/ #python #leetcode #codinginterview #coding #codingtutorial #grind75 #neetcode150
Combination Sum - Python || Simple Dynamic Programming Approach (It's basically Climbing Stairs)
Переглядів 1092 місяці тому
0:00 - 0:21 Problem statement 0:21 - 0:57 Problem examples and understanding the problem 0:57 - 4:57 Problem solving and visualization 4:57 - 9:44 Coding 9:44 - 10:09 Analysis 10:09 - 10:19 Conclusion Link to code: leetcode.com/problems/combination-sum/solutions/5964250/video-with-easy-explanation-codegrind-faster-then-91-52-dynamic-programming-solution/ #python #leetcode #codinginterview #codi...
Climbing Stairs - Python || An Introduction to Dynamic Programming
Переглядів 2612 місяці тому
0:00 - 0:08 Problem statement 0:08 - 0:35 Problem examples and understanding the problem 0:35 - 3:20 A better example and figuring out the algorithm 3:20 - 4:33 Coding 4:33 - 4:52 Conclusion Link to code: leetcode.com/problems/climbing-stairs/solutions/5949098/video-with-easy-explanation-codegrind-faster-then-100-dynamic-programming-solution/ #python #leetcode #coding #codinginterview #codingtu...
01 Matrix - Python || Dynamic Programming Approach
Переглядів 3102 місяці тому
0:00 - 0:07 Problem statement 0:07 - 0:45 Problem examples 0:45 - 2:51 A better example 2:51 - 6:01 Coding 6:01 - 6:65 Bonus: Short circuit evaluation 6:65 - 7:08 Runtime and conclusion Link to code: leetcode.com/problems/01-matrix/solutions/5927706/video-with-easy-explanation-codegrind-faster-then-100-dynamic-programming-solution/ #python #leetcode #coding #codinginterview #codingtutorial #gri...
Flood Fill - Python
Переглядів 472 місяці тому
0:00 - 1:31 intro 1:31 - 6:24 algorithm and code Link to code: leetcode.com/problems/flood-fill/solutions/5911675/video-with-easy-explanation-codegrind/ #python #leetcode #coding #codinginterview #codingtutorial #grind75 #neetcode150
Fruit Into Baskets - Python
Переглядів 322 місяці тому
Link to code: leetcode.com/problems/fruit-into-baskets/solutions/5900076/video-with-easy-explanation-codegrind/ #python #leetcode #coding #codinginterview #codingtutorial #grind75 #neetcode150
Best Time to Buy and Sell Stock - Python
Переглядів 403 місяці тому
Best Time to Buy and Sell Stock - Python
Longest Repeating Character Replacment - Python
Переглядів 283 місяці тому
Longest Repeating Character Replacment - Python
Randmly came here😂
Glad to see you found my corner of the internet ❤
clean explanation, thank you!
Glad to hear it helped :)
These are great, keep em coming!
I'm glad the video helped!
Fantastic, thank you!!
😁
great video!!
@@_ZaraKhan glad you liked it 😁
Thank you so much for posting these videos. As someone who is a self learner, these videos are so helpful!!!!
Glad to hear it helps 😁
I really like this format! Quick question, (and I may have missed this) but when selecting the first two nodes to initialize the queue, are there any specific conditions they should meet or does the algorithm work regardless of your pick?
Kahn's algo in a nut shell is: "if there is a node with no incoming edges (no arrows pointing to it) we can remove it from the graph". The first two nodes we picked didn't have any incoming edges so they were fair game to be removed. We could have started with either one of them.
@ oh yeah, duh. Of course! Haha. It’s literally just the first iteration of the algorithm. Thanks for clarifying!
@@_nr193 exactly 😎
this is so helpful, thank you!!
@@isabellaacosta3957 glad it helped out 😁
Super helpful! ☺
@@bikapix6177 glad it helped! :)
Good visual representation and straight into the video I love it keep it up.
Glad it helped! :)
Could the outer loop for i in range(target + 1) become for i in range(candidates[0],target + 1)? Assuming candidates is sorted.
Yeah it could actually! The input isn't assumed to be sorted but since we are already sorting to prevent duplicates this will not slow down the runtime 👍
Man these are so easy to watch and follow. Im loving them
So glad to hear it helps out! :)
how much time u spend to get the ability of solving hard problems easily
Honestly, I don't remember. I will say though that if you can learn the techniques to solve problems they stay with you. Until a month ago I hadn't Leetcoded in about 3 years. I'm getting back to it after getting laid off from my last full time position. If you check out my video playlists they go in order from easy to harder, but they all (almost always) use the same technique based on the data structure is being used in the playlist. You might find it quicker to learn that way. Hope that helps.
@@codegrindleetcode thx keep going your vidoes are so good
This is so helpful! Thank you so much for the video 😁
Glad it helped! :)
I’m ready to become a hacker after watching this video !
I'm glad it helped! :)