Mediusware interview question

polymorphism type, maximum subarray sum