Skip to content

Practice Equal Sum Grid Partition I

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Medium#3546
LeetCode Problem

Equal Sum Grid Partition I

Problem Statement

Determine whether one horizontal or vertical cut across grid can divide it into two nonempty sections with equal sums. Return whether such a cut exists.

Source: Equal Sum Grid Partition I on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
grid = [[1,4],[2,3]]
Output
true

# Example 2

Input
grid = [[1,3],[2,4]]
Output
false

Constraints

1 <= m == grid.length <= 10^5
1 <= n == grid[i].length <= 10^5
2 <= m * n <= 10^5
1 <= grid[i][j] <= 10^5

Related LeetCode Problems

Practice more problems similar to Equal Sum Grid Partition I.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.