LeetCodeCheck If N and Its Double ExistCheck If N and Its Double ExistEasyArrayHash TableTwo PointersBinary SearchSortingSolution export function checkIfExist(arr: number[]): boolean { const set = new Set(); for (const num of arr) { if (set.has(num * 2) || set.has(num / 2)) { return true; } set.add(num); } return false; }LeetCodeCheck If N and Its Double Existhttps://leetcode.com/problems/check-if-n-and-its-double-exist