You are viewing a single comment's thread. Return to all comments →
Thank you for sharing - I was thinking along the same lines. Is there any reason why you chose 2 billion as your upper bound for the difference? Why not math.inf?
biggest difference based on the values arr[i] can take
math.fabs(-10**9 - 10**9)