Minimum Elements to Add to Form a Given Sum
IntuitionApproachComplexity
Time complexity:

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

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

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

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

# Code
```golang []
func minElements(nums []int, limit int, goal int) int {
	var sum int64 = 0
	for _, num := range nums {
		sum += int64(num)
	}

	diff := math.Abs(float64(goal) - float64(sum))
	return int(math.Ceil(diff / float64(limit)))
}
```
['Go']