Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d872e02

Browse files
refactor 1346
1 parent 2c84a2f commit d872e02

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/main/java/com/fishercoder/solutions/_1346.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 1346. Check If N and Its Double Exist
5-
*
6-
* Given an array arr of integers, check if there exists two integers N and M such that N is the double of M ( i.e. N = 2 * M).
7-
*
8-
* More formally check if there exists two indices i and j such that :
9-
*
10-
* i != j
11-
* 0 <= i, j < arr.length
12-
* arr[i] == 2 * arr[j]
13-
*
14-
* Example 1:
15-
* Input: arr = [10,2,5,3]
16-
* Output: true
17-
* Explanation: N = 10 is the double of M = 5,that is, 10 = 2 * 5.
18-
*
19-
* Example 2:
20-
* Input: arr = [7,1,14,11]
21-
* Output: true
22-
* Explanation: N = 14 is the double of M = 7,that is, 14 = 2 * 7.
23-
*
24-
* Example 3:
25-
* Input: arr = [3,1,7,11]
26-
* Output: false
27-
* Explanation: In this case does not exist N and M, such that N = 2 * M.
28-
*
29-
* Constraints:
30-
* 2 <= arr.length <= 500
31-
* -10^3 <= arr[i] <= 10^3
32-
* */
333
public class _1346 {
344
public static class Solution1 {
355
public boolean checkIfExist(int[] arr) {

0 commit comments

Comments
 (0)