plzzz…check the code
i got issue in displaying characters .
getting Segmentation Fault.
Segmentation Fault in Digital Dictionary
@Pramod123
First, don’t do things like s[i] = ‘\0’. These are c++ stl strings not character array they are not null terminated, so its better to avoid doing these things.
In case of No suggestion, add that string to the trie, it is given in the question.
Also at line 73 just pass temp in display function, it will handle it. This will resolve the segmentation error.
1 Like
Sir plzzz…check the code
There’s error in output
@Pramod123
use ordered map because lexicographic order is required.
Also in case of no suggestions, addWord to the trie, so that it can be found next time(it is given in the question).
I have also done the required the changes(shown by comments) in your code, you can have a look https://ide.codingblocks.com/s/239097