The subarray with the largest sum in one pass: at each value, extend the run so far or restart, and keep the best. O(n) against O(n²) for every pair of ends, and it hands back where the subarray is, not just its sum.
This interactive visualization needs JavaScript.