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?
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
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
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
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 ? 😭😭😭😭
This as well as your BFS video was very well explained. Thank you.
Always happy to help!
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?
thanks for the video, it has been very useful for me
Hello! I want to ask where is the link of code in this video?? Thank you
If i want to use Letter like A B C D instead of numbers what can i change?
You could always use a hash table if you wanted to use a non-integer key
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
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
kya baat ha bhai maza agaya
dude how can we delete the edges/vertices inserted in DFS?
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
Dude, explain the code!! how does the code work?!!!!!
thanks for your effort
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 ? 😭😭😭😭
fucking error in your code
Where is the error? I didn't find any
skill issue