HCL Interview Question

Getting max sum from given array