C++ Data Structures: Depth First Search

Поділитися
Вставка
  • Опубліковано 8 січ 2025

КОМЕНТАРІ • 18

  • @2133pol
    @2133pol 5 років тому +10

    This as well as your BFS video was very well explained. Thank you.

  • @mars.the.empawror
    @mars.the.empawror 2 роки тому

    Does anybody know a video, where I can see how to create all graph states? In all these videos they are given, they just add edges but what is the best way to generate all possible edges (states) if let’s say I have N possible actions and the tree length M?

  • @eliaselmrabet
    @eliaselmrabet 3 роки тому +1

    thanks for the video, it has been very useful for me

  • @billylin2913
    @billylin2913 3 роки тому

    Hello! I want to ask where is the link of code in this video?? Thank you

  • @patricksantino4131
    @patricksantino4131 4 роки тому

    If i want to use Letter like A B C D instead of numbers what can i change?

    • @NotesByNick
      @NotesByNick  4 роки тому +1

      You could always use a hash table if you wanted to use a non-integer key

  • @TheMysticfire123
    @TheMysticfire123 3 роки тому

    for(auto i = adj[s].begin(); i != adj[s].end(); i++){
    [Error] 'i' does not name a type
    [Error] expected ';' before 'i'
    [Error] 'i' was not declared in this scope
    How to fix this ? i try your code but cannot run properly

    • @NotesByNick
      @NotesByNick  3 роки тому +1

      You’re probably using an old compiler and it’s not using C++ 11 which supports auto type deduction. Your options would be to not use auto types, or to use a newer compiler/compile with c++11 set as the standard

  • @maryyam361
    @maryyam361 17 днів тому

    kya baat ha bhai maza agaya

  • @junaidjawed8933
    @junaidjawed8933 4 роки тому

    dude how can we delete the edges/vertices inserted in DFS?

    • @NotesByNick
      @NotesByNick  4 роки тому +2

      DFS is graph traversal algorithm, so the problem isn't really related to DFS. If you want to delete some edge/vertex from a graph, it would depend on how you are representing the graph. At a high level, to delete an edge from the graph, you would just need to remove the connection from both adjacency lists of the two vertices the edge connects. Deleting a vertex is just an extension of this problem, where you just delete all edges connected to the vertex you are removing.
      Hope this helps,
      --Nick

  • @sphanish123
    @sphanish123 4 роки тому +1

    Dude, explain the code!! how does the code work?!!!!!

  • @mehmetaliozer2403
    @mehmetaliozer2403 4 роки тому

    thanks for your effort

  • @ainurrulnajwasahlan8692
    @ainurrulnajwasahlan8692 3 роки тому

    Hai sir, im so thank full for your explaination. It helps me on figure out code for my assignment. Sadly, i got error . I am so lack of idea on how to solve the logic error. Would you mind to help me ? 😭😭😭😭

  • @bellasvideo5620
    @bellasvideo5620 5 років тому

    fucking error in your code