I working on a simple water pipeline path modelling and listing each path.
The model is simple because the pipes do not create loops or grids. It consists of nodes which are representing the edge of each pipe segment. Based on this we can say it is similar to a Binary Tree data model. However, as I understand, trees are hierarchical data structures. And also, I see on https://www.geeksforgeeks.org/print-root-leaf-path-without-using-recursion/?ref=lbp that, data is defined with left-right-left.left etc, by describing the exact location of each node. In my case, the data should include only the start and end nodes for each pipe segment. Each node should also include info if it is the source (root) or leaf node. Number of leaf nodes will be equal to number of paths. My model does not require any hierarchy and also it does not require left-right definition. In this case we may say it is similar to a Graph, but my model also does not have loops or grids.
So please advise how to model this and create an algorithm.