Easy Java Solution|| O(m+n) Solution|| Beginner Friendly.........
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- O(M+N), because it iterates through HashSet and then banned array\n\n- Space complexity:\nO(N)\n\n# Code\n```java []\nclass Solution {\n    public int maxCount(int[] banned, int n, int maxSum){ \n\n        HashSet<Integer> map=new HashSet<>();\n        for(int i:banned){\n            map.add(i);\n        }\n        int count=0;\n        int sum=0;\n        for(int i=1;i<=n;i++){\n            if(!map.contains(i))\n            {\n              sum=sum+i;\n           \n              if(sum>maxSum){\n                return count;\n              }\n              count++;\n            }\n        }\n\n        return count; //O(m+n) because it iterates through set and then banned array\n    }\n}\n```
['Hash Table', 'Java']