Filter interviews by
Leetcode medium-hard
Find the largest sum of contiguous subarray within a given array of integers.
Iterate through the array and keep track of the current sum and maximum sum seen so far.
If the current sum becomes negative, reset it to 0 as it won't contribute to the maximum sum.
Return the maximum sum found at the end of the iteration.
Top trending discussions
based on 1 interview
Interview experience
Senior Engineer
81
salaries
| ₹4.1 L/yr - ₹7.8 L/yr |
Engineer
75
salaries
| ₹2.8 L/yr - ₹6.2 L/yr |
Deputy Manager
51
salaries
| ₹6.5 L/yr - ₹10.8 L/yr |
Electrical Engineer
39
salaries
| ₹1.5 L/yr - ₹6.5 L/yr |
Mechanical Engineer
33
salaries
| ₹2.4 L/yr - ₹6.2 L/yr |
BHEL
Thermax Limited
Kirloskar Electric Company
Siemens