PYTHON || BEATS 100 % || EASY FOR BEGINNERS || SPACE COMPLEXITY || TIME COMPLEXITY
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
```cpp []
class Solution {
public:
    int minElement(vector<int>& nums) {
        for (int i=0;i<nums.size();i++){
            string no=to_string(nums[i]);
            int sum=0;
            for (char j:no){
                sum+=j-'0';
            }
            nums[i]=sum;
        }
        int min=nums[0];
        for (int h=1;h<nums.size();h++){
            if (nums[h]<min){
                min=nums[h];
            }
        }
        return min;
    }
};
```
['C++']