3

PROBLEM OF THE DAY : 10/12/2023 | Subarray with 0 sum

 9 months ago
source link: https://www.geeksforgeeks.org/videos/problem-of-the-day-10122023-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

PROBLEM OF THE DAY : 10/12/2023

December 11, 2023 |1.0K Views
PROBLEM OF THE DAY : 10/12/2023 | Subarray with 0 sum
Problem of the Day, subarray, Data Structure and Algorithm
 Save  Share  2 Likes
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Array but also build up problem-solving skills.

In this problem, we are given, an array of integers. Find if there is a subarray (of size at least one) with 0 sum. You just need to return true/false depending upon whether there is a subarray present with 0-sum or not. Printing will be taken care by the driver code.

Example :

Input:
n = 5
arr = {4,2,-3,1,6}
Output: 
Yes

Explanation: 
2, -3, 1 is the subarray with sum 0.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/subarray-with-0-sum-1587115621/1

Read More

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK