Solved Max Different Sub Array with a n^3 algorithm