• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
April 25, 2022 |5.5K Views
Largest subarray with 0 sum | SDE Sheet | Arrays
  Share  2 Likes
Description
Discussion

In this video we will see how to find the length of the longest sub-array with a sum that equals 0, from a given array of integers, Examples: Input: arr[] = {15, -2, 2, -8, 1, 7, 10, 23}; Output: 5 Explanation: The longest sub-array with elements summing up-to 0 is {-2, 2, -8, 1, 7} Check out the video to see how we implement this!! Practice Problem: https://practice.geeksforgeeks.org/problems/largest-subarray-with-0-sum/1 Article: https://www.geeksforgeeks.org/find-the-largest-subarray-with-0-sum/ SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/

Read More