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.
Nice, thanks for your solution.
I have an improvement which would reduce a half of loop.
In case of diff > k, after increasing i by 1, let's check of i == j and increase j by 1 as well.
Pairs
You are viewing a single comment's thread. Return to all comments →
Nice, thanks for your solution. I have an improvement which would reduce a half of loop. In case of diff > k, after increasing i by 1, let's check of i == j and increase j by 1 as well.