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.
sort and then check the diff of two adjecent numbers.. keep tracking the min value, update the both pairs in a list, if the new pair is having less than last min value, then delete the list, update with new pairs,, if the new pair is having exact value, add them in list too.
Closest Numbers
You are viewing a single comment's thread. Return to all comments →
sort and then check the diff of two adjecent numbers.. keep tracking the min value, update the both pairs in a list, if the new pair is having less than last min value, then delete the list, update with new pairs,, if the new pair is having exact value, add them in list too.