We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Incase u've run the code successfully with #3rd and #7th case failed. try out initializing the variable which stores the sum as a negative(eg.-999).Since for values where the sum is negative,it doesnot update the content of max value as a negative value when the variable sum is initialized to zero.
2D Array - DS
You are viewing a single comment's thread. Return to all comments →
Incase u've run the code successfully with #3rd and #7th case failed. try out initializing the variable which stores the sum as a negative(eg.-999).Since for values where the sum is negative,it doesnot update the content of max value as a negative value when the variable sum is initialized to zero.