Frage im Vorstellungsgespräch bei Amazon

Kadane's Algorithm and some modification to it, BFS implementation