MINESWEEPER (Leetcode) - Code & Whiteboard
Vložit
- čas přidán 23. 09. 2020
- An intuitive and not-too-verbose solution to Leetcode problem 529 - Minesweeper. As always, coded in Python with a whiteboard explanation, too :)
Let me know if you guys have any questions, and I'd be happy to address them!
leetcode.com/problems/mineswe...
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Let's connect on LinkedIn!
/ aleksmitrovic
Follow me on Medium!
/ mitrovic.aleksandar
Questions or suggestions for new videos? Email me!
babybear4812@gmail.com - Věda a technologie
Hey man, I just came across your video. This is by far the best leetcode explanation I have ever seen. Great stuff man, keep it up!
I really appreciate that man, thank you so much 🙏
bro this is awesome, you kept us engaged, explained the solution super efficiently and kept a positive and enthusiastic attitude throughout the whole vid. Good shit man, u earned a sub!
Thanks a lot brotha I appreciate it!!!
Hi, This is awesome and easy solution I found so far for this problem. Thanks a lot !
Thanks for the video. Great explanation. ✌️✌️
awesome! Love the visual whiteboarding!
Thanks Billy, I'll keep it coming :D
Very well explained :) Thank you so much. Can you please explain the time complexity.
After your amazing explanation this turned into a VERY EASY question. Thank you.
love it, that's what we aim for!!
again your explanation is just amazing, thank you! I never knew this is how you play the game lol
Hahah, the video was dual purpose. thanks buddy
Thanks Man. Great Explanation
Thank you for the feedback! Glad I could help :)
Excellent video, subbed, keep it up
thx man!
Great explanation !
thx bro
appreciate you!
Thank you, easy to understand..
Thx bud
Thanks for uploading, very easy and well explanation. what will be time and space complexity ?
Thanks bud. A quick Google search on this told me it’s O(m*n), I’m a bit too rusty and hungover to verify but this smells about right 😂
Thank you for this video ! great explanation ! just one questions though. I feel like if in your first call you find mines around your node, it returns the board and wont go through the else statement where you have the recursive call. Please let me know if I am making a mistake
Hey Payam, yup that's exactly what happens! Although that's by design.
Notice that in point 1 in the instructions tells us to change the cell to an 'X' and that the game is over. In the case of the first call being a mine, we'll label it appropriately, never enter the `else` statement, and return things as they are :)
@@babybear-hq9yd Thanks for replying :)
Appreciate.
Can another condition be added during calling the recursive function, to check whether the next visiting block is not the number of mines?
we're only reaally checking to see if it's a mine or not. Not sure if checking for anything else would help us make the algo any faster
great video. this is an example of breadth-first search right?
from what I remember, I would say yes! :)
I think it's DFS
I hope you upload more video!!!!!
thanks anber! Maybe one day :)
what is the time and space complexity of this code?
probably O(n*m) if i remember correctly
I Just hate how coding interview has become like competitive exam like C.A.T , where the problems for coding has significance
In real system design .
because it provides a job to many candidates unlike CAT (10K), IIT (10K), Bank (2K).
Software developers millions