Let T be a full binary weighted tree. For a node v in T, the cost of going right is a i.e w(v, v.right) = a while w(v, v.left) = b
How do I find optimal paths to all leaves from the root. I don't think classical graph traversals are helpful in this context as I don't need to visit all nodes.