#3300

Minimum Element After Replacement With Digit Sum

easy · 84.7% accepted · 101 likes · top 96%

array · math

⊣ practice⊣ open on leetcode ↗

Description

You are given an integer array nums.

You replace each element in nums with the sum of its digits.

Return the minimum element in nums after all replacements.

Solution