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.
have coded the following (naive) O(n^2) solution code below. (Sorry HackerRank people for posting code, I'll not do it again :-) ) It passes only a few test cases and times out as I expected on others. Can anyone see a problem with the logic?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Choose and Calculate
You are viewing a single comment's thread. Return to all comments →
have coded the following (naive) O(n^2) solution code below. (Sorry HackerRank people for posting code, I'll not do it again :-) ) It passes only a few test cases and times out as I expected on others. Can anyone see a problem with the logic?