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 happened to me several times(with other problems). I managed to verify that program throws exception by inserting try-catch in different lines, particularly for lines of code doing memory allocation (with "new"), thus verified that it was a memory limitation issue. when I decreases O(n^2) memory usage - it passes. However it can be other reasons as well like overflow(you computer may have other arch of course) and as a consequence - division by zero etc. this happened to me too )).
regards.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Consecutive Subsequences
You are viewing a single comment's thread. Return to all comments →
it happened to me several times(with other problems). I managed to verify that program throws exception by inserting try-catch in different lines, particularly for lines of code doing memory allocation (with "new"), thus verified that it was a memory limitation issue. when I decreases O(n^2) memory usage - it passes. However it can be other reasons as well like overflow(you computer may have other arch of course) and as a consequence - division by zero etc. this happened to me too )). regards.