Not understanding the question Treasuere Hunt

Can you please explain the question? In am not understanding what the question is saying. Also can you please dry run on this array : [“ab”, “abc”, “m”, “abd”, “acd”, “abd”]

Hello @17uec133,

In this problem, you are given n clues in the form of n strings.
You have to find a code with the help of the given clues based on the length of longest common prefix of (ai, aj).
It will too large to dry run this approach the example you have given.

Solution:
This is question of Trie.
what we do is for all nodes of the trie , we calculate number of strings in the substree and then just apply combinatorics.
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.