code runs fine on netbeans but showing misatch error in coding blocks idehttps://ide.codingblocks.com/s/124723
Mismatch exception
see the logic of your code is not correct…your code will just sum the positive values in the array…
but we need to find out a continuous set(subarray)…
Read about kadanes algo to solve this ques in O(n)