In this video we will see how to print all subarray within a given array that has zero sum.
Examples:
Input: arr = [6, 3, -1, -3, 4, -2, 2,
4, 6, -12, -7]
Output:
Subarray found from Index 2 to 4
Subarray found from Index 2 to 6
Subarray found from Index 5 to 6
Subarray found from Index 6 to 9
Subarray found from Index 0 to 10
Check out the video to see how we implement this!!
Practice Problem: https://practice.geeksforgeeks.org/problems/zero-sum-subarrays1825/1
Article: https://www.geeksforgeeks.org/print-all-subarrays-with-0-sum/
SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/