Maximize Greatness of an Array

Maximize Greatness of an Array - Coding Problem | K5kC