python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
discovery time & finishing time of Depth first search
I am performing a depth-first traversal in a graph, where for a vertex v, d[v] is the discovery time, and f[v] is the finishing time.
Now I want to know which of the following is wrong:
i) d[u] < d...

Christopher Marlowe
Votes: 0
Answers: 1
How to solve KeyError in dfs, bfs
I was trying to create bfs, dfs programs by using the following python code. Unfortunately having this error...... anybody plz help for me
Traceback (most recent call last):
File "D:...\1260.py&...
Jongmin Park
Votes: 0
Answers: 1
Longest series that can be built from a given graph edges
I'm trying to build a program that finds the longest series that can be built from a given edges represented by list of tuples with pair of values, i.e:
[(1,2), (1,2), (2,3), (2,17), (2,17)]
Edges ca...
JanieM
Votes: 0
Answers: 0
Python recursive function that prints filesystem hierachy
I want to write a recursive function that pretty prints a file hierarchy with some indentation depending on the level of depth inside the hierarchy. For each item printed, i want to display its size ...
itma96
Votes: 0
Answers: 1