depth-first-search
Finding the longest cycle in a directed graph using DFS
I need to find the longest cycle in a directed graph using DFS. I once saw this Wikipedia article describing the way of doing this, and I think it approached the problem something like marking the no[详细]
2023-01-31 23:05 分类:问答Recursive DFS Ruby method
I have a YAML file of groups that I would like to get into a MongoDB collection called groups with documents like {\"name\" => \"golf\", \"parent\" => \"sports\"} (Top level groups, like sports,[详细]
2023-01-28 22:25 分类:问答Does this python code employs Depth First Search (DFS) for finding all paths?
This code is given in python official essays on graph theory. Here\'s the code: def find_all_paths(graph, start, end, path=[]):[详细]
2023-01-26 15:10 分类:问答Maze Solving using graph
Hey i was in a local programming competition and they asked me this question which i could not do so please help me on this one.[详细]
2023-01-24 19:08 分类:问答Having some kind of XML/Json file to compile into Graphiz / Finite State Automaton. Any suggestions?
I have a task where I need to take some existing pictures[ which show some automata (DFA, NFA, Turing machines)] and somehow convert them into a format, which enables me to use the data to represent i[详细]
2023-01-22 21:17 分类:问答finding a way for a car in a maze using DFS algorithm (C programming)
hello everyone can anybody help me with the DFS algorithm : Path* agent_DFS (void* arg1,...); which is written on C program and is about Artificial intelligence which I have to find a way for a car to[详细]
2023-01-22 13:56 分类:问答Query about N- Queen solving?
I solved the N- Queen problem with the condition that there can only be one queen per column. So I place a queen in a square in first column, then move onto the next column and place a queen in a squa[详细]
2023-01-20 06:09 分类:问答How can I remember which data structures are used by DFS and BFS?
I always mix up whether I use a stack or a queue for DFS开发者_如何学C or BFS. Can someone please provide some intuition about how to remember which algorithm uses which data structure?Queue can be ge[详细]
2023-01-19 18:30 分类:问答General DFS on River Crossers
I\'m trying to write a DFS to solve multiple river crossing problems (Fox Goat Cabbage, Jealous Husbands, Mercenaries and Cannibals, etc.). I\'ve written the puzzle classes, but I\'m having trouble st[详细]
2023-01-19 12:39 分类:问答What are the practical factors to consider when choosing between Depth-First Search (DFS) and Breadth-First Search (BFS)? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing[详细]
2023-01-09 01:11 分类:问答