Python (Simple Maths)
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```python3 []\nclass Solution:\n    def maxFrequency(self, nums, k, numOperations):\n        dict1, ans, max_val = Counter(nums), set(), 1 \n\n        nums.sort()\n\n        for num in nums:\n            ans.add(num-k)\n            ans.add(num)\n            ans.add(num+k)\n\n        for i in ans:\n            max_val = max(max_val,dict1[i]+min(bisect.bisect_right(nums,i+k)-bisect.bisect_left(nums,i-k)-dict1[i],numOperations))\n\n        return max_val \n```
['Python3']