You are viewing a single comment's thread. Return to all comments →
Check for duplicates helps to avoid unnecessary computations.
if len(arr) != len(list(set(arr))): result = 0
This is relevant for one of the tests.
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Absolute Difference in an Array
You are viewing a single comment's thread. Return to all comments →
Check for duplicates helps to avoid unnecessary computations.
This is relevant for one of the tests.