easy and intuitive
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\nint fun(int num){\n    int ans=0;\n  while(num){\n    ans+=num%10;\n    num/=10;\n  }\n    return ans;\n}\n    int minElement(vector<int>& nums) {\n        int ans=1e8;\n        for(auto it :nums){\n            int x=fun(it);\n            ans=min(x,ans);\n        }\n        return ans;\n    }\n};\n```
['C++']