← Adobe questions
CodingReported in a candidate post, Jul 2025

Minimum number of corner elements to reach sum k

Filed under Adobe

Given an array and an integer k, find the minimum number of elements you must take only from the two ends (left or right, repeatedly) so that their sum equals k. Return -1 if it is impossible…

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 Adobe questions

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