1689. Partitioning Into Minimum Number Of Deci-Binary Numbers
Medium
Input: n = "32"
Output: 3
Explanation: 10 + 11 + 11 = 32Input: n = "82734"
Output: 8Input: n = "27346209830709182346"
Output: 9Last updated
Input: n = "32"
Output: 3
Explanation: 10 + 11 + 11 = 32Input: n = "82734"
Output: 8Input: n = "27346209830709182346"
Output: 9Last updated
class Solution:
def minPartitions(self, n: str) -> int:
maximum = 0
for char in list(n):
maximum = max(maximum, int(char))
return maximum