Valid Sudoku - LeetCode 36 - Java

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024

ความคิดเห็น • 46

  • @shobhanathsharma2113
    @shobhanathsharma2113 ปีที่แล้ว +6

    Very simple and intuitive explanation. Really appreciate it

  • @andretheruler714
    @andretheruler714 2 ปีที่แล้ว +3

    thank you i was lost until i watched you video on this

  • @vamsiswaroopv549
    @vamsiswaroopv549 11 วันที่ผ่านมา +1

    Very simple and easy to understand approach. Really appreciate this effort from your side

    • @LeetCodeUniversity
      @LeetCodeUniversity  11 วันที่ผ่านมา

      Thank you. I am glad you found it helpful!

  • @alexshay7969
    @alexshay7969 ปีที่แล้ว +3

    A great explanation on the individual boxes! None else explains this in their code. They just copy and memorize. A terrible way to teach. Thanks!!

    • @LeetCodeUniversity
      @LeetCodeUniversity  ปีที่แล้ว

      Thank you, I am really glad you found the video helpful!

  • @suggestaname1685
    @suggestaname1685 2 ปีที่แล้ว +4

    WOW, I never thought about using a single HashSet. That is so smart, thank you for sharing and for great explanation!

  • @162sujiths4
    @162sujiths4 11 หลายเดือนก่อน +2

    Short and crisp 👏

  • @KittyInCali
    @KittyInCali 2 หลายเดือนก่อน +1

    I went over multiple videos, this was by far the best explanation

  • @ukpauchechi
    @ukpauchechi 2 หลายเดือนก่อน +1

    Thanks for this explanation, wish I could give this more than one thumbs up😊

    • @LeetCodeUniversity
      @LeetCodeUniversity  2 หลายเดือนก่อน

      You are so kind. Thank you and glad it was helpful!!

  • @ranjitasahu19
    @ranjitasahu19 2 หลายเดือนก่อน +1

    This is so good approach, thanks a lot.

  • @6lack-Echo
    @6lack-Echo 2 ปีที่แล้ว +2

    You should make more videos, love your explanation would watch a whole DS&A playlist by you :)

  • @amitghosh5
    @amitghosh5 หลายเดือนก่อน +1

    this was great. I have immediately subscribed

  • @saleheen12
    @saleheen12 หลายเดือนก่อน

    Thanks. Only explanation I understood.

  • @Jack-ke3wm
    @Jack-ke3wm 2 ปีที่แล้ว +1

    Very smart technique! Thank you for great explanation.

  • @bashierdahman4550
    @bashierdahman4550 ปีที่แล้ว +1

    Could you please post more, your videos are the best on youtube!

    • @LeetCodeUniversity
      @LeetCodeUniversity  ปีที่แล้ว +1

      Thank you 🙏 I am having a really hard time to find the time to shoot the videos. I will try though

  • @nitingoel258
    @nitingoel258 2 ปีที่แล้ว +1

    Thank You , very well explained !

  • @anthonyang8494
    @anthonyang8494 2 ปีที่แล้ว +1

    Very very good explanation! Ty

  • @foswacs4868
    @foswacs4868 ปีที่แล้ว +1

    Hope I am not too late to ask questions. How is it that the double for loop you wrote in the answer actual iterates through the board?
    For ( int i = 0; i < board.length; i ++)
    For (int j = 0; j < board[i].length; j ++)
    Isn't this how to traverse through a 2-D matrix/ array ?

    • @LeetCodeUniversity
      @LeetCodeUniversity  ปีที่แล้ว

      You are exactly right. The double for loop is used to traverse over a 2-D matrix. But what is that? It is a grid composed of rows and columns. The sudoku board is a grid composed or rows and columns. So it is indeed a 2-D array/matrix. Now, board.length is finding the number of rows And board[i].length is finding the number of columns. In this case we know the board has 9 rows and 9 columns.
      I hope this helps. If not, please let me know exactly where you are confused and I will explain further.

  • @legna516
    @legna516 6 หลายเดือนก่อน

    Please continue your content, much appreciated! Liked and subscribed.

  • @Miscellaneous-Things
    @Miscellaneous-Things 2 ปีที่แล้ว +1

    Great explanation as always.

  • @nautilus2024
    @nautilus2024 5 หลายเดือนก่อน +1

    wow, awesome !

  • @amitbhattacharya356
    @amitbhattacharya356 2 ปีที่แล้ว +1

    Time complexity will be O(n^2) ?

    • @LeetCodeUniversity
      @LeetCodeUniversity  2 ปีที่แล้ว +3

      In this Question since we know the grid is 9*9 then the time is not depended on the input. We will always go over all 81 fields in the board. So the time is O(81) = O(1) aka constant time. Now, if they said that the grid is N * N then the time is O(n^2)

  • @anandsinha1063
    @anandsinha1063 28 วันที่ผ่านมา

    Why you have used strings in hash set

  • @bobzero3727
    @bobzero3727 ปีที่แล้ว +1

    That was great