Search⌘ K
AI Features

Maximum Number of Integers to Choose from a Range I

Maximum Number of Integers to Choose from a Range I asks for the largest set of distinct, non-banned integers from one through the given upper bound whose sum stays within the allowed limit.

Statement

Given an integer array banned and two integers n and maxSum, determine the maximum ...