Maximum sum choosing K elements from either end
Filed under Myntra
The question
Given an array of positive integers and an integer K, find the maximum sum of K elements taken from the beginning and/or the end of the array.
No write-up yet. Related questions below have one.
Related Myntra questions
Collected from public candidate posts and coding forums. Updated Nov 2026.