akibk001's blog

By akibk001, history, 5 years ago, In English

I'm solving wpuzzle problem on spoj . I'm using Aho-corasick algorithm. My idea is keep original patterns as well as reverse the patterns and store them. And using both of these two create a trie and traverse the matrix four times in different ways : 1.left to right traversal 2.up to down traversal 3.diagonally and all the patterns found will be stored. But it is giving me WA. Can you tell the problem in this method. Any failing test cases?? question and my code link.. https://www.spoj.com/problems/WPUZZLES/
https://github.com/mohd-akib/spoj/blob/master/wordpuzzles.cpp

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it