Tap here to switch tabs
Problem
Submissions

Problem: Split Array With Same Average

Try to solve the Split Array With Same Average problem.

Statement

You are given an integer array nums.

Determine if it is possible to partition nums into two non empty arrays A and B such that the average value of elements in A is equal to the average value of elements in B.

Return true if such a partition exists, or false otherwise.

Note: The average of an array is defined as the sum of all its elements divided by the number of elements in the array.

Constraints:

  • 1≤1 \le nums.length ≤30\le 30

  • 0≤0 \le nums[i] ≤104\le 10^4

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Split Array With Same Average

Try to solve the Split Array With Same Average problem.

Statement

You are given an integer array nums.

Determine if it is possible to partition nums into two non empty arrays A and B such that the average value of elements in A is equal to the average value of elements in B.

Return true if such a partition exists, or false otherwise.

Note: The average of an array is defined as the sum of all its elements divided by the number of elements in the array.

Constraints:

  • 1≤1 \le nums.length ≤30\le 30

  • 0≤0 \le nums[i] ≤104\le 10^4