Pregunta de entrevista de Flipkart

maximum sum od k elements in an array by taking only corner elements