• + 0 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.