Watto and Mechanism (Tries) Help required.

Revision en1, by MazzForces, 2016-03-29 14:59:14

Hey Guys, I've been trying for a long time to solve this question Watto and Mechinism using a Trie. I know this task can be accomplished using hashing too, but I need help with a Trie based solution so that I can understand Tries better.

Now, I Have written a solution in Java almost identical to another solution that has been written in C++. The C++ based soltuion gets an AC, whereas I keep getting TLE on test case 33. The AC code does not belong to me and I've used it only for learning purpose . I have completely been unable to understand what I have done different My Submission from this one . Please help me with this. What am I doing wrong or different from the AC solution here.??

Tags trie, recursion

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English MazzForces 2016-03-29 14:59:14 897 Initial revision (published)