XRQRS RUNTIME ERROR (SIGSEGV)

I am getting RUNTIME ERROR(SIGSEGV) .I have implemented trie for this question.

problem link:

link text

here is my solution ink:

link text

please anyone help…
Any hint would be appreciated!!

How did you solved it Finally ?