You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a similar solution and tried copy-pasting your solution on the coding ninjas platform. I am getting TLE and my score is 88. How can we optimize this?
My code: https://pastebin.com/XRHhLaw9
The text was updated successfully, but these errors were encountered:
I have a similar solution and tried copy-pasting your solution on the coding ninjas platform. I am getting TLE and my score is 88. How can we optimize this? My code: https://pastebin.com/XRHhLaw9
Try deleting memory allocated to trie using deconstructor
like this ~Node() { for (int i = 0; i < 26; i++) { if (links[i] != NULL) delete links[i]; } }
and at the end delete root
This will remove TLE.
I have a similar solution and tried copy-pasting your solution on the coding ninjas platform. I am getting TLE and my score is 88. How can we optimize this?
My code: https://pastebin.com/XRHhLaw9
The text was updated successfully, but these errors were encountered: