Sheokand and String june 2018 long

june18
sigsev

#1

https://www.codechef.com/JUNE18B/problems/SHKSTR/
Above is the link to the problem

https://www.codechef.com/viewsolution/18863280

Above is the solution for the problem. I dont know why it is giving SIGSEV. It runs perfectly on my local machine. The implementation is that of Trie data structure. Please help.