Check If N and Its Double Exist
Return True if there are two different positions i and j in arr with arr[i] == 2 * arr[j]. Otherwise return False.
Watch out for 0: it is its own double, so it needs to appear twice.
Example 1
arr [10,2,5,3]
returns true
10 is the double of 5.
Example 2
arr [3,1,7,11]
returns false
No item is twice another.
Constraints
2 <= len(arr) <= 40-50 <= arr[i] <= 50
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.