Maximum Subarray Sum

  • + 0 comments

    Even with this, it was insufficiently fast for me and failed on 14.

    The optimization that allowed this method to pass for me was to preinitialize the array. This saves on perhaps many memory operations that would be used to extend the array.

    That said, myself I don't quite know what principle it is that allows us to know which prefix to search for based on the current one.