The Maximum Returned Value has to be 36
This is pretty much just a standard solution for this problem.One thing to note is that the maximum returned value can only be 36. This is because the maximum v
This is pretty much just a standard solution for this problem.

One thing to note is that the maximum returned value can only be $$36$$. This is because the maximum value for `nums[i]` is $$10^4$$. So, the number with the greatest digit sum would be $$9999$$, getting a sum of $$9+9+9+9=36$$. So, we don't need to set the minimum value to a very large number or the maximum integer value, we can just set it to $$36$$.

# Code
```golang []
func minElement(nums []int) int {
    min := 36
    for _, n := range nums {
        x := 0
        for n > 0 {
            x += n % 10
            n /= 10
        }
        if x < min {
            min = x
        }
    }

    return min
}
```
['Go']