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.
I believe that this exercise could give 100% just with 10^5, I made my solution, with a good complexity (N x logN), but due to the constant multiplier (5), it failed in 50% of cases in Java 8 , however in Java 15 it passed in 100% of cases, with the same solution, demonstrating that the problem was not logic in itself, but rather language details and micro optimization, as for example in the comments below people having to worry about something as specific as optimizing for 1, which I already find meaningless.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Array Pairs
You are viewing a single comment's thread. Return to all comments →
The Problem is focusing on unnecessary things
I believe that this exercise could give 100% just with 10^5, I made my solution, with a good complexity (N x logN), but due to the constant multiplier (5), it failed in 50% of cases in Java 8 , however in Java 15 it passed in 100% of cases, with the same solution, demonstrating that the problem was not logic in itself, but rather language details and micro optimization, as for example in the comments below people having to worry about something as specific as optimizing for 1, which I already find meaningless.