1346. Check If N and Its Double Exist
Python
class Solution:
def checkIfExist(self, arr: List[int]) -> bool:
for i in range(len(arr)):
if arr[i] * 2 in arr[i+1:] + arr[:i]:
return True
return False
class Solution:
def checkIfExist(self, arr: List[int]) -> bool:
for i in range(len(arr)):
if arr[i] * 2 in arr[i+1:] + arr[:i]:
return True
return False