There is a network of tracks (list), tracks are of two types - standard (with one start and one end point) and with a fork ( one start and two end points). These points are called nodes. It is known that each track can only be connected to one other track. Thus, each node is connected to at least one other node, with a maximum of three nodes (if this is the starting point of the track with a fork).
Question:
Write a method that determines whether it is possible to delete a specific track, provided that the network should not break.
Would you recommend me ?
Create a new graph object and implementing it in a similar way? ( The graph is not a tree, it has many edges and loops)