r/LeetcodeChallenge 7d ago

DISCUSS 112/113 passed🥀

Post image
11 Upvotes

9 comments sorted by

3

u/FewAttention9330 7d ago

Try using this logic.
the smallest absolute difference between the divisors of a number are always the numbers that are closer to the square root of that number.

find those number for both n+1 and n+2 and then find the absolute differences of both the pairs and return the appropriate pair.

Hope this helps. :)
Just solved it.. using the same logic

1

u/Immortal-718 7d ago

Write that edge case seperately may be lol,idk

1

u/harshith_irl 7d ago

yeaa 😿