I just watched the video for Kadene’s algorithm and decided to implement it. However, I am having a little problem with my code as the output is coming out not as expected.
After inputting values {-1, 0} it gives output as: 0.
but for values {-1,-1} it is still giving out output: 0.
I made sure that my code is correct and deleted y whole implementation and re-wrote it exactly as the mentor showed but it is still not working. Is this a compiler issue? I am confused.