Please explain .. briefly

IN UNIQUE PREFIX ARRAY ,time complexity is O(n*max length of string) ,it is for what??

hello @AMIT_KUMAR
this time complexity for printing unique prefixes for all the given strings .

if n string are there then for each string we can iterate upto max depth of trie in worst case.
and because max depth of trie is equal to max length string therefore time complexity will be
O(N* MAX LENGTH OF STRING)

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.