I have tried for days to come up with code. I just can't wrap my head around how I should build a tree and trace back to various points, including all the way back to the root when at the last node. I have attached what I was able to come up with. I don't know if it's any good, but I tried anyway. If someone knows how to code this, could you explain? If it's not too much trouble, could you upload the code and put the explanation in comments? I have attached what I was able to come up with.