The language I am using is C#, but I am looking more for help with the algorithm more than I am concerned with which language.  I have been trying to develop this algorithm for a while now and I can't seem to get it down.I have a tree like structure which has many parent/child relationships.  So leaf #1 can have children, and the children can have children, and so on and so on. This forms a tree.  My problem is that I want to be able to list out every possible path down the tree to the bottom.My data is in a C# list of objects and each object has 2 fields, parent and child.So my data could look something like this:Parent       Child1              21              32              42              53              63              73              84              94              10My real data is more complex than this as I have thousands of rows.  In the sample above here is the results I want to achieve:1  2  4  91  2  4  101  2  41  2  51  3  61  3  7I did see some other similar solutions on this website, but they were a little different than what I need.  A leaf in my tree can have more than 2 children as shown above.
Find all paths in a tree type of structure
algorithms