9

Largest subarray with 0 sum | SDE Sheet | Arrays

 3 years ago
source link: https://www.geeksforgeeks.org/videos/largest-subarray-with-0-sum/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Largest subarray with 0 sum
Largest subarray with 0 sum | SDE Sheet | Arrays
Video Player is loading.
Loaded: 0%
00:00
Remaining Time -10:53
  • 220 Views
  • 25/04/2022

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/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK