Only 2 Lines Code ||  Easy C++ ✅✅
Approach\n Describe your approach to solving the problem. \nResult = abs(Current_Sum - Goal) / Limit + (abs(Current_sum-Goal)%Limit!=0)\n# Complexity\n- Time co
# Approach\n<!-- Describe your approach to solving the problem. -->\n`Result = abs(Current_Sum - Goal) / Limit + (abs(Current_sum-Goal)%Limit!=0)`\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minElements(vector<int>& arr, int limit, int g) {\n        long long sum = accumulate(arr.begin(),arr.end(),1LL*0);\n        return  1LL*abs(g - sum)/limit+(abs(g-sum)%limit>=1);\n    }\n};\n```\n![upvote.jpg](https://assets.leetcode.com/users/images/0867d213-2b71-4436-9615-8ea807874958_1691780034.1849213.jpeg)\n
['Greedy', 'C++']