I was actually about to ask you on mail on how you did it. I always look forward to @meoow and your solutions on any problem
I’m pretty sure many people solved it using hashing too.(I’m one of them)
3 Likes
Well yes 2 pointer, binary search, hashing all are basically searching ways. So, my point was just that there were easier ways than tries.
1 Like
There you go
I am using some help from the Java collections. I don’t know why I am getting WA in only 2 of test cases.
Can somebody help me?
Link to my answer: https://www.codechef.com/viewsolution/13641286
Try this-
Input 1:
4
- codechef
- coded
+ coder
+ codechefu
Input 2:
3
- codechef
- coded
+ codechefu
Expected output is -1 for both, your program doesnt print that.
Yes. This editorial only has editorialist’s solution at the moment.