Digital Dictionary from hashing

I think the logic is correct but still I am getting incorrect output.

Please, take a look

Hey @div_yanshu07 when I gave an input
4
abc
aab
absdsd
jerej
3
ab
j
x

It’s giving an output

Output

No suggestions
No suggestions
No suggestions

Whereas expected output is
abc
absdsd
jerej
No suggestions
Might be something wrong in implementation. Cause the data structure you have used is appropriate :slight_smile:

Moreover there are few more test cases like
10
sher
sherlock
sherlocked
tardis
tardisblue
luck
lucifer
samdean
castiel
cassifer
8
lu
s
chuck
c
cas
sherl
tardisissexy
tard
In this expected output is
lucifer
luck
samdean
sher
sherlock
sherlocked
No suggestions
cassifer
castiel
chuck
cassifer
castiel
sherlock
sherlocked
No suggestions
tardis
tardisblue
tardisissexy
But your output is giving

Output

No suggestions
No suggestions
No suggestions
No suggestions
No suggestions
No suggestions
No suggestions
No suggestions

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.