Help me in blocked website please.

Hi iam pcpa1kalyan. I had asked a question about blocked websites problem a week ago. Since then i tried to optimize my question a lot. This is the current version of my code. It is not passing only in 3 test cases now. I can’t find a way out. Please someone point out the bug in my code.

Here is my code

Try to bump the old thread you created next time. The info there could be of help.

@pcpa1kalyan can’t see your code, say’s access denied

Bro, Simply go and watch this video on trie and then try to implement it yourself. If still having problem this is my solution :-
I also solved it after watching this video on basic of tries.
If still having problem comment it down below.

1 Like

hey vijju, I am not getting what you have meant. Could you elaborate?

Hi @Abhishel, You can see my code up there now. Thank you friend.

Hey Bro, Thanks a lot for your nice advice.
Instead of using tries, I have approached the problem in a different manner. It involves some hashing and a lot of “greediness”. My algorithm is perfect so far. But it has some bug which is making my algorithm to fail in 3 test cases when I submit it. I tried a lot but can’t find that bug.Any help in this regard would be a great relief for me. Because I am stuck with this problem for almost a week. Anyways, I’ll definitely learn about tries. Thank you!!!