Simple iterative solution || c++ || beats 100%
IntuitionApproachComplexity
Time complexity:O(n)

Space complexity:O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int minElements(vector<int>& nums, int limit, int goal) {
        long long sum = 0;
        int n = nums.size();
        for(int i = 0;i<n;i++){
            sum = sum + nums[i];
        }

        long req = abs(sum - goal);

        if(req%limit){
            return (req/limit)+1;
        }
        return req/limit;
    }
};
```
['Array', 'Greedy', 'C++']