Maximum Sum of All Sub-arrays, draft, poor time complexity