What is the problem with this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is the problem with this code?

I am making a dfs program but it is not showing the correct output. I am making a dfs with adjacent matrix without using list, pair and class, just by using array and vector. main algorithm start form line 49 and i am using a random function to generate a graph. https://code.sololearn.com/cL740lSEvEG2/#cpp

21st Oct 2020, 5:52 AM
Abhishek Dimri
Abhishek Dimri - avatar
2 Answers
+ 1
You should enter right vertices
26th Oct 2020, 7:30 AM
Rajdeep Singh
Rajdeep Singh - avatar
+ 1
Rajdeep Singh I want to do this with adjacent matrix form, rest i can do with entering vertices by telling which vertex is connected to which or by using recursion buy I want to do this in this way
28th Oct 2020, 12:54 PM
Abhishek Dimri
Abhishek Dimri - avatar