โ† Visa questions

Minimum umbrellas needed for K people

Filed under Visa

Given a sorted array of umbrella capacities and an integer K, find the minimum number of umbrellas needed to protect exactly K people. If it is impossible, return -1.

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

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