Tap here to switch tabs
Problem
Submissions

Problem: Find Subarrays With Equal Sum

med
30 min
Try to solve the Find Subarrays With Equal Sum problem.

Statement

Given a 00 indexed integer array nums, determine if there exist two distinct subarrays of length 22 that have the same sum.

Return true if such subarrays exist, or false otherwise.

Note: Two subarrays are considered distinct if they begin at different starting indices, even if their elements are identical.

Constraints:

  • 2≤2 \leq nums.length ≤1000\leq 1000

  • −109≤-10^9 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find Subarrays With Equal Sum

med
30 min
Try to solve the Find Subarrays With Equal Sum problem.

Statement

Given a 00 indexed integer array nums, determine if there exist two distinct subarrays of length 22 that have the same sum.

Return true if such subarrays exist, or false otherwise.

Note: Two subarrays are considered distinct if they begin at different starting indices, even if their elements are identical.

Constraints:

  • 2≤2 \leq nums.length ≤1000\leq 1000

  • −109≤-10^9 \leq nums[i] ≤109\leq 10^9