i have tried to implement this question without trie, but not able to figure out, where i’m going wrong. can u please help me?
Https://ide.codingblocks.com/s/333204
wrong answer, not passed a single test case
i dont have problem link , please share the problem link with me
https://online.codingblocks.com/app/player/65048/content/151609/5362/code-challenge this is the prob link
try this test case->
10
sher
sherlock
sherlocked
tardis
tardisblue
luck
lucifer
samdean
castiel
cassifer
8
lu
s
chuck
c
cas
sherl
tardisissexy
tard
correct output=>
lucifer
luck
samdean
sher
sherlock
sherlocked
No suggestions
cassifer
castiel
chuck
cassifer
castiel
sherlock
sherlocked
No suggestions
tardis
tardisblue
tardisissexy
check ur updated code->
u missed one case -> if searched word is not found then add that word in ur dictionary
in some test cases i’m getting tle, how can i avoid this?
try trie … … …
can u tell me how to implement the search function?
refer this ->