#Kadane algorithm for maximum #subarray can be viewed as a simple/trivial example of #dynamicprogramming.