We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Interestingly enough inspired by your post I've decided to solve the task using node class, instead of chained dictionaries. Using python 3 the 12th test case results in runtime error. I've downloaded the test case and it worked fine. The exact same code with change to raw_input & xrange results in segmentation fault on #3, #4, #12. As much as I would like to help you my only suggestion as of now is to rewrite the code using chained dictionaries and see the results (all test cases passed in python 2 as well as python 3 this way). Hopefully someone more knowledgeable will show up :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Contacts
You are viewing a single comment's thread. Return to all comments →
Interestingly enough inspired by your post I've decided to solve the task using node class, instead of chained dictionaries. Using python 3 the 12th test case results in runtime error. I've downloaded the test case and it worked fine. The exact same code with change to raw_input & xrange results in segmentation fault on #3, #4, #12. As much as I would like to help you my only suggestion as of now is to rewrite the code using chained dictionaries and see the results (all test cases passed in python 2 as well as python 3 this way). Hopefully someone more knowledgeable will show up :)