LeetCode

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

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

  • @voiceofvaishhhh
    @voiceofvaishhhh 11 หลายเดือนก่อน +6

    so underrated! your explanation with examples of both cases is perfect for making me understand and visualise :) Thank you!

  • @vigneshs6232
    @vigneshs6232 11 หลายเดือนก่อน +4

    Marvelous Explanation.....Please do more of the videos like these....

  • @maud5159
    @maud5159 8 หลายเดือนก่อน +2

    Everything you highlight in the video is very helpful, it must take you a lot of time to edit the videos. I appreciate the effort. Keep it up :)

  • @DevilHunter173
    @DevilHunter173 9 หลายเดือนก่อน +2

    One of the best explanation videos i have seen so far.. You have earned a subscriber. Well-done brother!!!❤

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

    Very good explanation. Really helped me wrap my head around topological sorting with just this video, even though it's the first time I have heard of it.Thank you, make more!

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

    This is a very beautiful explanation. Thanks a lot!!

  • @AdityaSingh-nn2cd
    @AdityaSingh-nn2cd หลายเดือนก่อน

    Great Explanation and very clear and understanding visualization , Thanks for helping and keep going ;)

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

    Extremely easy to understand and visuzalize. Thanksss a lot!!

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

    Incredible explanation. I loved how you showed all steps along with visualisation. Thanks a lot.

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

    I think your graph representation is confusing. Because for [1, 0] prereq, you drawed as 0 --> 1 like 0 is dependent to 1. But in this case 1 is dependent to 0 (we have to take course 0 before course 1, so course 1 depends on course 0)

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

    wouldn't it be better to use double ended queue instead of list to implement the 'queue' variable?

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

    Thanks a lot for the video. I tried a BFS with a set that keeps track of already visited nodes for cycle detection but that didn't seem to work, any ideas on as to why?

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

      BFS with only a set will sometimes falsely detect a cycle in a directed graph. Imagine a graph: 0 -> 1, 1 -> 2, 0 -> 2. So there are two directed edges going into 2. If you start from 0, BFS will detect a cycle because you'll visit 2 twice, but because of the direction of the edges, there is actually no cycle.

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

      @@AlgoEngine Oh yes that makes sense. Thank you!