I tried my best
Approach\nLoop though n or maxSum whichever is smallest and see if it is in banned set. \n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(n)\
# Approach\nLoop though n or maxSum whichever is smallest and see if it is in banned set. \n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(n)$$\n\n# Code\n```python3 []\nclass Solution:\n    def maxCount(self, banned: List[int], n: int, maxSum: int) -> int:\n         currSum = 0\n         currCount = 0\n         banned = set(banned)\n         \n         for i in range(1, min(n + 1, maxSum)):\n             if i not in banned:\n                 currSum = currSum + i \n                 if maxSum < currSum:\n                    return currCount\n                 currCount += 1\n         return currCount\n```
['Python3']