Java Greedy Solution
\npublic int minElements(int[] nums, int limit, int goal) {\n\tlong sum = 0;\n\tfor (int i = 0; i < nums.length; i++) {\n\t\tsum += nums[i];\n\t}\n\tlong delta 
```\npublic int minElements(int[] nums, int limit, int goal) {\n\tlong sum = 0;\n\tfor (int i = 0; i < nums.length; i++) {\n\t\tsum += nums[i];\n\t}\n\tlong delta = (long)goal - sum;\n\treturn (int)((Math.abs(delta) + limit - 1) / limit);  // You will need the ceil in such a integer division here.\n}\n```
[]