Max Integers From Range

You are given an integer array banned (unique values), and integers n and maxSum. Choose integers from [1, n] that are not in banned such that their sum does not exceed maxSum. Return the maximum count of integers you can choose.

Examples
Input: [[1,6,5],5,6]
Output: 2
Hints

Max Integers From Range

You are given an integer array banned (unique values), and integers n and maxSum. Choose integers from [1, n] that are not in banned such that their sum does not exceed maxSum. Return the maximum count of integers you can choose.