https://github.com/anishkumar127/data-structures-and-algorithms
Solutions to Arrays, Strings, Lists, Sorting, Stacks, Trees and General DS problems using JAVA.
https://github.com/anishkumar127/data-structures-and-algorithms
algorithms algorithms-and-data-structures codestudio-solutions data data-structures gfg-solutions hackerrank-solutions hacktoberfest hacktoberfest2022 hacktoebrfest-accepted java leetcode leetcode-java leetcode-solution leetcode-solutions notes pdf solutions
Last synced: 2 months ago
JSON representation
Solutions to Arrays, Strings, Lists, Sorting, Stacks, Trees and General DS problems using JAVA.
- Host: GitHub
- URL: https://github.com/anishkumar127/data-structures-and-algorithms
- Owner: anishkumar127
- License: mit
- Created: 2021-10-03T13:40:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-05-19T06:29:41.000Z (5 months ago)
- Last Synced: 2025-05-19T07:34:12.316Z (5 months ago)
- Topics: algorithms, algorithms-and-data-structures, codestudio-solutions, data, data-structures, gfg-solutions, hackerrank-solutions, hacktoberfest, hacktoberfest2022, hacktoebrfest-accepted, java, leetcode, leetcode-java, leetcode-solution, leetcode-solutions, notes, pdf, solutions
- Language: Java
- Homepage:
- Size: 2.15 MB
- Stars: 12
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# [**Largest rectangular sub-matrix whose sum is 0**](https://www.geeksforgeeks.org/largest-rectangular-sub-matrix-whose-sum-0/)
## prerequisite :-
- 01. Maximum sum rectangle
- largest subarray with 0 sum```java
import java.util.*;class GFG {
public static void main (String[] args) {
int a[][] = { { 1, 2, 3, 4 }, { -1, -2, -4, -3 },
{ -7, -9, 7, 9 }, { 7, -2, 0, 10 } };
int row = 4, col = 4;
System.out.println(larRecSumZero(a, row, col));
}
static int larRecSumZero(int arr[][], int n, int m){
int dp[]=new int[m];
int ans=0;
for(int a=0; a si=new HashMap<>();
for(int i=0;i