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.
It seems that creating a class in Python 2 has such a memory overhead. I started on the problem with creating a Node class and had the same problem. As a next try I removed the functions from the class and only used the "empty" class as a data structure and still had the seg faults (#3, #4, #12). At the end I used a list instead of the class, but with a very same structure (two attributes = two element list) and all worked fine. I am actually surprised about this...
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 →
It seems that creating a class in Python 2 has such a memory overhead. I started on the problem with creating a Node class and had the same problem. As a next try I removed the functions from the class and only used the "empty" class as a data structure and still had the seg faults (#3, #4, #12). At the end I used a list instead of the class, but with a very same structure (two attributes = two element list) and all worked fine. I am actually surprised about this...