C language tree algorithm

Asked 1 years ago, Updated 1 years ago, 64 views

If I say that I have vertices A and B, I don't know how to make sure they're connected and how to write the source code... ㅠ<

c tree algorithm

2022-09-21 16:08

1 Answers

Set the A vertex as the starting point, and find the B vertex with depth-first search (DFS), width-first search (BFS), etc.

Google the graph search algorithm and study it~

(A tree is a type of graph.)

https://gmlwjd9405.github.io/2018/08/13/data-structure-graph.html


2022-09-21 16:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.