Write the definition of the get_source_nodes() function, which should return a vector of all source nodes in the graph.
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write the definition of the get_source_nodes() function, which should return a vector of all source nodes in the graph.
Write the definition ofthe get_source_nodes() function, which should return avector of all source nodes in the graph.Remember that a node is a source if it hasonly out edges. You can use any of the otherfunctions in the class in your implementation.