Treasure Hunt : Tries

I didn’t understand the concept of the ques. Can you please explain it to me with an example if possible ? Also can you please provide the solution to this problem ?

@aman_ishan what we do is for all nodes of the trie , we calculate number of strings in the substree and then just apply combinatorics such -
NC2(total nodes in the subtree of current nodes)-summation of NC2(children in each nodes)
unable to explain it that clearly ,
you can see my code:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.