Premium Only Content
This video is only available to Rumble Premium subscribers. Subscribe to
enjoy exclusive content and ad-free viewing.

1346. Check If N and Its Double Exist
9 months ago
9
Given an array arr of integers, check if there exist two indices i and j such that :
i != j
0 <= i, j < arr.length
arr[i] == 2 * arr[j]
Example 1:
Input: arr = [10,2,5,3]
Output: true
Explanation: For i = 0 and j = 2, arr[i] == 10 == 2 * 5 == 2 * arr[j]
Example 2:
Input: arr = [3,1,7,11]
Output: false
Explanation: There is no i and j that satisfy the conditions.
Constraints:
2 <= arr.length <= 500
-103 <= arr[i] <= 103
bool checkIfExist(int* arr, int arrSize) {
int n = arrSize;
for(int i=0; i<n; i++)
for(int j=i+1; j<2*n; j++)
if(arr[i] == 2*arr[j%n] && i != j%n){
printf("%d %d",arr[i],2*arr[j%n]);
return true;
}
return false;
}
Loading comments...
-
43:44
Man in America
7 hours agoAmericans Are About to Lose Everything—And They Don’t Even Know It
25.9K17 -
Adam Does Movies
2 days ago $0.02 earnedTalking Movies + Ask Me Anything - LIVE
16.4K1 -
LIVE
I_Came_With_Fire_Podcast
13 hours agoNASA Blocks China, TPUSA BOOSTED, Chinese Spamoflauge, & Factional Division
277 watching -
33:40
Jamie Kennedy
5 hours agoEp 222 Processing the Loss of Charlie Kirk | HTBITY with Jamie Kennedy
32.6K14 -
1:32:05
Badlands Media
20 hours agoAltered State S3 Ep. 46: Tactical Nukes, Thermite, and the 9/11 Puzzle
52.6K5 -
9:18
ARFCOM News
9 hours ago $0.88 earnedNSSF "Celebrates" ATF Partnership | Glocks BANNED | Redundant Spooky Boi Ban
26.7K9 -
LFA TV
18 hours agoLFA TV ALL DAY STREAM - WEDNESDAY 9/17/25
299K61 -
1:00:00
BEK TV
1 day agoAPRIL LUND: FAITH, FOCUS, AND THE ROAD TO THE 2028 OLYMPIC MARATHON
19.8K -
37:15
Stephen Gardner
4 hours ago🔥Trump ERUPTS After Obama’s Charlie Kirk Comments!
32.3K66 -
13:40:35
Total Horse Channel
15 hours ago2025 WDAA Western Dressage World Championship Show | Day Two | Arena One
24.6K