https://dev.to/ashiq_omar/maximum-subarray-sum-kadanes-algorithm-4fk4