Kotlin, array, beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```kotlin []\nclass Solution {\n    fun maxCount(banned: IntArray, n: Int, maxSum: Int): Int {\n        val bannedSet = Array<Boolean>(10005) { false }\n        for (v in banned) {\n            bannedSet[v] = true\n        }   \n        \n        var count = 0\n        var sum = 0\n        for (i in 1..n) {\n            if (sum + i <= maxSum && !bannedSet[i]) {\n                count++\n                sum += i\n            }\n        }\n        return count\n    }\n}\n```
['Kotlin']