You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h2><ahref="https://leetcode.com/problems/check-if-n-and-its-double-exist/?envType=daily-question&envId=2024-12-01">1346. Check If N and Its Double Exist</a></h2><h3>Easy</h3><hr><p>Given an array <code>arr</code> of integers, check if there exist two indices <code>i</code> and <code>j</code> such that :</p>
2
+
3
+
<ul>
4
+
<li><code>i != j</code></li>
5
+
<li><code>0 <= i, j < arr.length</code></li>
6
+
<li><code>arr[i] == 2 * arr[j]</code></li>
7
+
</ul>
8
+
9
+
<p> </p>
10
+
<p><strongclass="example">Example 1:</strong></p>
11
+
12
+
<pre>
13
+
<strong>Input:</strong> arr = [10,2,5,3]
14
+
<strong>Output:</strong> true
15
+
<strong>Explanation:</strong> For i = 0 and j = 2, arr[i] == 10 == 2 * 5 == 2 * arr[j]
16
+
</pre>
17
+
18
+
<p><strongclass="example">Example 2:</strong></p>
19
+
20
+
<pre>
21
+
<strong>Input:</strong> arr = [3,1,7,11]
22
+
<strong>Output:</strong> false
23
+
<strong>Explanation:</strong> There is no i and j that satisfy the conditions.
0 commit comments