HTMLify
LeetCode - Check If N and Its Double Exist - Python
Views: 342 | Author: abh
1 2 3 4 5 6 7 8 9 | class Solution: def checkIfExist(self, arr: List[int]) -> bool: for i in range(len(arr)): for j in range(len(arr)): if i == j: continue if arr[i] == arr[j] * 2: return True return False |