nearly in every tree problem there is lack of description how does input is taken so it become hard for proceeding question further like in this how to build tree and add tree diagramitacally as it will help to understand problem better
Please clarify inputs in tree problems
It must be given in the question how you are supposed to take the inputs. Still i will report your issue.