{"id":29877824,"url":"https://github.com/anishkumar127/data-structures-and-algorithms","last_synced_at":"2025-07-31T06:07:19.624Z","repository":{"id":39888127,"uuid":"413088560","full_name":"anishkumar127/Data-Structures-and-Algorithms","owner":"anishkumar127","description":"Solutions to Arrays, Strings, Lists, Sorting, Stacks, Trees and General DS problems using JAVA. ","archived":false,"fork":false,"pushed_at":"2025-05-19T06:29:41.000Z","size":2252,"stargazers_count":12,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-19T07:34:12.316Z","etag":null,"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"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anishkumar127.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-10-03T13:40:24.000Z","updated_at":"2025-05-19T06:29:48.000Z","dependencies_parsed_at":"2023-02-04T02:02:20.292Z","dependency_job_id":"74e4208b-98a1-44d4-84bc-168d1ac2f3c0","html_url":"https://github.com/anishkumar127/Data-Structures-and-Algorithms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anishkumar127/Data-Structures-and-Algorithms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkumar127%2FData-Structures-and-Algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkumar127%2FData-Structures-and-Algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkumar127%2FData-Structures-and-Algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkumar127%2FData-Structures-and-Algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anishkumar127","download_url":"https://codeload.github.com/anishkumar127/Data-Structures-and-Algorithms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anishkumar127%2FData-Structures-and-Algorithms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267997150,"owners_count":24178250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2025-07-31T06:07:15.953Z","updated_at":"2025-07-31T06:07:19.617Z","avatar_url":"https://github.com/anishkumar127.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [**Largest rectangular sub-matrix whose sum is 0**](https://www.geeksforgeeks.org/largest-rectangular-sub-matrix-whose-sum-0/)\n\n## prerequisite :-\n- 01. Maximum sum rectangle\n-  largest subarray with 0 sum\n\n```java\nimport java.util.*;\n\nclass GFG {\n\tpublic static void main (String[] args) {\n\t\tint a[][] = { { 1, 2, 3, 4 }, { -1, -2, -4, -3 },\n                      { -7, -9, 7, 9 }, { 7, -2, 0, 10 } };\n  \n    int row = 4, col = 4;\n    System.out.println(larRecSumZero(a, row, col));\n\t}\n\t\n    static int\tlarRecSumZero(int arr[][], int n, int m){\n\t    int dp[]=new int[m];\n\t    \n\t    int ans=0;\n\t    for(int a=0; a\u003cn; a++){\n\t        Arrays.fill(dp,0);\n\t        \n\t        for(int i=a; i\u003cn; i++){\n\t            for(int j=0; j\u003cm; j++){\n\t                dp[j]+=arr[i][j];\n\t            }\n\t            int b = i-a+1;\n\t            int l = larSubArrZeroSum(dp,m);\n\t            \n\t            ans = Math.max(ans, l*b);\n\t        }\n\t    }\n\t    return ans;\n\t}\n\t\n\t\n\t\n\tstatic int larSubArrZeroSum(int arr[], int n){\n\t    int maxL=0;\n\t    int sum=0;\n\t    HashMap\u003cInteger, Integer\u003e si=new HashMap\u003c\u003e();\n\t    \n\t    for(int i=0;i\u003cn;i++){\n            sum+=arr[i];\n            if(sum==0) maxL=i+1;\n            else{\n               if(si.containsKey(sum))\n                    maxL=Math.max(maxL,i-si.get(sum));\n               else\n                    si.put(sum,i);\n            }\n        }\n        return maxL;\n\t}\n};\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanishkumar127%2Fdata-structures-and-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanishkumar127%2Fdata-structures-and-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanishkumar127%2Fdata-structures-and-algorithms/lists"}