
[LeetCode] 1346. Check If N and Its Double Exist - Python
·
알고리즘/LeetCode
난이도: Easy문제 설명Given an array arr of integers, check if there exist two indices i and j such that :i != j0 arr[i] == 2 * arr[j] 문제 예제Example 1:Input: arr = [10,2,5,3]Output: trueExplanation: For i = 0 and j = 2, arr[i] == 10 == 2 * 5 == 2 * arr[j] Example 2:Input: arr = [3,1,7,11]Output: falseExplanation: There is no i and j that satisfy the conditions. 제한 사항2 -10^3 ✏️ Solution(솔루션)class Solutio..