MAQ Software interview question

Min subarray queation and that too was basic