I am trying to solve Autocomplete Problem and implementing trie solution for it. I am getting segmentation fault when the length of the input string is 10^6. It seems to be a out of memory issue and I am not able to figure out where I am going wrong. The link to the solution is here . Please help !!
Thanks