I have a tree that has n-levels. For example here I have four levels:
Each node has two children (except for the last one), however everyone except for the first and last node of each row has two parents. I'm trying to figure out a scalable way to get all paths into a List of Lists, so that for this example, I will have a List of Lists of chars:
A,B,D,G A,B,D,H A,B,E,H
Can anyone help steer me to the right direction of finding an algorithm for this regardless of how many levels?