MINESWEEPER (Leetcode) - Code & Whiteboard

Sdílet
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

Komentáře • 40

  • @UnknownName7950
    @UnknownName7950 Před 3 lety +5

    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!

    • @babybear-hq9yd
      @babybear-hq9yd  Před 3 lety

      I really appreciate that man, thank you so much 🙏

  • @Clipaholick
    @Clipaholick Před 2 lety +1

    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!

  • @udrush
    @udrush Před 2 lety

    Hi, This is awesome and easy solution I found so far for this problem. Thanks a lot !

  • @prashantsikarwar3804
    @prashantsikarwar3804 Před 3 lety

    Thanks for the video. Great explanation. ✌️✌️

  • @billysapsford3439
    @billysapsford3439 Před 3 lety

    awesome! Love the visual whiteboarding!

  • @shilpabg2488
    @shilpabg2488 Před 3 lety

    Very well explained :) Thank you so much. Can you please explain the time complexity.

  • @yukselpolatakbyk8468
    @yukselpolatakbyk8468 Před 2 lety

    After your amazing explanation this turned into a VERY EASY question. Thank you.

  • @Cloud-577
    @Cloud-577 Před 2 lety

    again your explanation is just amazing, thank you! I never knew this is how you play the game lol

  • @vishnunandyala6037
    @vishnunandyala6037 Před 3 lety

    Thanks Man. Great Explanation

  • @sayeedchowdhury11
    @sayeedchowdhury11 Před 3 měsíci

    Excellent video, subbed, keep it up

  • @nithinsastrytellapuri291
    @nithinsastrytellapuri291 Před 4 měsíci

    Great explanation !

  • @DailyGrindOfTech
    @DailyGrindOfTech Před rokem

    appreciate you!

  • @hisyamzayd
    @hisyamzayd Před 2 lety

    Thank you, easy to understand..

  • @Relqeds
    @Relqeds Před 2 lety

    Thanks for uploading, very easy and well explanation. what will be time and space complexity ?

    • @babybear-hq9yd
      @babybear-hq9yd  Před 2 lety +1

      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 😂

  • @payamkhorramshahi5726
    @payamkhorramshahi5726 Před 3 lety

    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

    • @babybear-hq9yd
      @babybear-hq9yd  Před 3 lety

      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 :)

    • @payamkhorramshahi5726
      @payamkhorramshahi5726 Před 3 lety

      @@babybear-hq9yd Thanks for replying :)

  • @andriidanylov9453
    @andriidanylov9453 Před 2 lety

    Appreciate.

  • @amithkoutinagaraj5419

    Can another condition be added during calling the recursive function, to check whether the next visiting block is not the number of mines?

    • @babybear-hq9yd
      @babybear-hq9yd  Před rokem

      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

  • @snake1625b
    @snake1625b Před 2 lety +1

    great video. this is an example of breadth-first search right?

  • @hhjdkdnchidnd
    @hhjdkdnchidnd Před 2 lety

    I hope you upload more video!!!!!

  • @bhushankhope8949
    @bhushankhope8949 Před 7 měsíci

    what is the time and space complexity of this code?

  • @alokcom
    @alokcom Před 3 lety

    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 .

    • @vinoddiwan5792
      @vinoddiwan5792 Před 3 lety

      because it provides a job to many candidates unlike CAT (10K), IIT (10K), Bank (2K).
      Software developers millions