← Intuit questions
CodingReported in a candidate post, Jul 2025

Maximize the sum of K elements taken from the array ends

Filed under Intuit

Given an integer array cardPoints and an integer k, pick exactly k elements, each taken from either the left end or the right end of the array, to maximise their sum. Return the maximum sum.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Intuit questions

Collected from public candidate posts and coding forums. Updated Nov 2026.