Depth First Search Explained and Implemented in Java | DFS | Graph Traversal & Theory | Geekific

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024

Комментарии • 58

  • @Affliction604
    @Affliction604 2 года назад +10

    This video have helped me more than any other DFS video. You're born to be a teacher :D
    Implementation is also clean and tight, that's excellence of highest highs.
    I literally no-brainer subscribed to your channel.
    Many thanks!

    • @geekific
      @geekific  2 года назад

      Wow, thanks a lot for the kind words and the support man, glad I could help!! :)

    • @Affliction604
      @Affliction604 2 года назад +1

      @@geekific Had you started this channel few years back you'd have millions subs by now.. Keep grinding and u'll get there

    • @lathan8486
      @lathan8486 Год назад

      Totally agreed. This video has helped me more than any other video I watched on DFS. Very clear explanation.

  • @qwarlockz8017
    @qwarlockz8017 Месяц назад

    Dude! /Your explanations and illistrations are clear! This is the best I have seen. Thanks!

  • @KarimFawaz
    @KarimFawaz Год назад +3

    Nice videos man, I have an upcoming interview in Java and I'll be relying on your channel for the revision. From one Lebanese guy to another, thank you for the great content

    • @geekific
      @geekific  Год назад +2

      Thank you Karim! Glad I can help, good luck with your interview :)

    • @manOfPlanetEarth
      @manOfPlanetEarth Год назад +2

      Good luck w your interview!

    • @KarimFawaz
      @KarimFawaz Год назад

      @@manOfPlanetEarth Thanks man!

    • @OmoruyiOmofonmwan
      @OmoruyiOmofonmwan Год назад

      How did your interview go?

    • @KarimFawaz
      @KarimFawaz Год назад

      @@OmoruyiOmofonmwan got to the final stage and someone did better than me. fair play though it was Apple so they only take one person per position. This helped though! thanks for asking

  • @LucasSouza-tc1wz
    @LucasSouza-tc1wz 2 года назад +2

    Wow! really clean and concise explanation. 1 more subscriber!

    • @geekific
      @geekific  2 года назад

      Welcome aboard! and Thanks a lot!

  • @beachwave5705
    @beachwave5705 Год назад +3

    i was getting really confused trying to understand the different between bfs and dfs that i kept rewatching both videos to try and learn the concept. after just deciding to implement both and try and analyze line by line the difference, im realizing dfs uses stacks, and bfs use queues

  • @manOfPlanetEarth
    @manOfPlanetEarth Год назад

    Recursive option with stream is lovely😊

  • @RABBITTGAMING
    @RABBITTGAMING Год назад

    Thankuuu so muchhh u really deserve more 💜

  • @m.pashakhoshkebari2045
    @m.pashakhoshkebari2045 2 года назад

    Great Video! Thank you so much

    • @geekific
      @geekific  2 года назад

      Glad you enjoyed it!

  • @Ranman1810
    @Ranman1810 Год назад

    Thank you😍

  • @fauzanmaulanaalfany7592
    @fauzanmaulanaalfany7592 Год назад +1

    Yang versi indonesia ada ga yah?

    • @geekific
      @geekific  Год назад +1

      I am sorry, I speak four languages, but Indonesian is not one of them.

  • @jimmyloluolajide7777
    @jimmyloluolajide7777 2 года назад

    Very informative. Thanks for sharing. Please, I have a question relating to this topic and would like to contact you. How do I reach you? Thanks

    • @geekific
      @geekific  2 года назад

      Thank you! Feel free to reply to this comment or to add a new comment, I read every one of them! Or you can contact me via the youtube mail :)

    • @jimmyloluolajide7777
      @jimmyloluolajide7777 2 года назад

      @@geekific Thanks for your prompt response. I want to share an image of my question. Traveling from Bucharest to Sibiu and I need to use DFS BFS and UCS

    • @geekific
      @geekific  2 года назад

      Sure... Please feel free to use the comments section or the youtube mail only. Thanks.

    • @manOfPlanetEarth
      @manOfPlanetEarth Год назад

      @@geekific
      :)) Man, why did you say that to him? 🤔
      You can't but know that it is impossible either to share image or use youtube email in youtube:) No youtube email is revealed to anyone. For example, plz say my youtube email:)

    • @geekific
      @geekific  Год назад

      @@manOfPlanetEarth In the about section you can.

  • @manOfPlanetEarth
    @manOfPlanetEarth Год назад

    3:40
    😂 what a funny smilie is added:)
    I even feel all his amazement🤣

  • @emil8367
    @emil8367 Год назад

    v0.setNeighbors(new ArrayList(List.of(v1, v5, v6))), ... to avoid the Exception due to immutable list :-)

    • @geekific
      @geekific  Год назад

      In this particular example it is not needed. But great job for noticing it! :)

    • @FootClob
      @FootClob Год назад

      thanks alot I was getting that exception when I wanted to reverse the order of the elements of the list.

  • @ma.josephinebancoro4999
    @ma.josephinebancoro4999 2 года назад

    This is directed graph right?

    • @geekific
      @geekific  2 года назад +3

      Hello :) Yes it is! This is represented by the arrowed-edges between two nodes. If you want to know more about undirected/directed graphs feel free to check this video: ruclips.net/video/bZMNBTkiUoM/видео.html. Cheers!

    • @ma.josephinebancoro4999
      @ma.josephinebancoro4999 2 года назад +1

      @@geekific Thank you so much. You deserve more likes and views. Your vids are very informative and easy to understand. Thank youu

    • @geekific
      @geekific  2 года назад +1

      Thanks a lot for your kind words! Am not sure if you deleted the previous comment but I received a notification for it, so am gonna answer (but I guess you figured it out on your own). You need to have two separate classes, the Vertex and the DFS class, I made them generic and I guess that's where your error comes from (4:33, check ruclips.net/video/vqjA6dqugq8/видео.html for more info) and if you want to use lombok like I did here is your reference: ruclips.net/video/sPgTC-e6QyY/видео.html.
      Hopefully, when I polish the code and make it available on GitHub you won't encounter any more issues :)
      Have a nice day!

    • @ma.josephinebancoro4999
      @ma.josephinebancoro4999 2 года назад

      @@geekific Yes im sorry i deleted my question because i figured it out thank you so much your vid helps alot. More views and likes to come!

  • @Man_arulhidayat
    @Man_arulhidayat Год назад

    I cant search on github. Can you help me 🥲

    • @geekific
      @geekific  Год назад

      Depth First Search is under the dfs folder. I prefer not to send links here as they will/may change in the future.

  • @AR-rg2en
    @AR-rg2en Год назад

    Algorithms rise up

  • @Decimo12378
    @Decimo12378 2 года назад

    can i have the source code of this:)

    • @geekific
      @geekific  2 года назад +2

      I will make everything available on GitHub as soon as the channel grows and I make time to polish the code of all the videos! Stay Tuned! In the meantime, if I can help, or you have any question feel free to ask in the comments section :)

  • @manOfPlanetEarth
    @manOfPlanetEarth Год назад

    I already know the material but repetition goes sssoooooo slowly:((((😭😭 What the heck?!🤬

    • @geekific
      @geekific  Год назад

      The pace was improved in more recent videos! Let me know your feedback if you catch any recent ones :)

    • @manOfPlanetEarth
      @manOfPlanetEarth Год назад

      @@geekific
      No, no, no, man!!! I am not talking about your speech rate!:) Your speech rate is perfect☝🏼👍🏼
      I even put 0.75x :) Don't even think about bothering about speech rate: it's adjustable in YT.
      I am talking about MY SPEED of repetition of material. I know dfs/bfs, but each of this video takes me 2 hours to fully cover. How is that?!🤷‍♂️

  • @mohamadjafsouniali7989
    @mohamadjafsouniali7989 2 года назад

    ive always had a question in mind are u lebanese XD

  • @manOfPlanetEarth
    @manOfPlanetEarth Год назад

    6:25
    🤔 Why do you tend to use Arrays.asList instead of List.of?🤔
    The same in BFS video.
    The same in Ford-Fulkerson video: "new HashMap(Map.of(...))" instead of simply "Map.of(...)"🤔

    • @geekific
      @geekific  Год назад

      The list returned by Arrays.asList() is mutable, whereas, List.of() returns an immutable list that is a copy of the provided input array. So, it depends on what I am doing. Same for Maps.

    • @manOfPlanetEarth
      @manOfPlanetEarth Год назад

      @@geekific
      Yes, but you do not add/delete elements in those collections here🤔 You do not mutate. And still use mutable.

  • @icecreamwala12
    @icecreamwala12 Год назад +1

    Amazing explanation! And the way you have implemented the classes are just 🤌🏻😍