Skip to content

Latest commit

 

History

History

minimum-element-after-replacement-with-digit-sum

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Minimum element after replacement with digit sum

Problem link

Solutions

Solution.py

# https://leetcode.com/problems/minimum-element-after-replacement-with-digit-sum/

class Solution:
    def minElement(self, nums: List[int]) -> int:
        return min(sum(int(x) for x in str(y)) for y in nums)

Tags