d-Matrix Interview Question

dynamic programming to partition array with minimum sum difference.