1689. Partitioning Into Deci-Binary Numbers
Question
A decimal number is called deci-binary if each of its digits is either
0or1without any leading zeros. For example,101and1100are deci-binary, while112and3001are not.Given a string
nthat represents a positive decimal integer, return the minimum number of positive deci-binary numbers needed so that they sum up ton.
Solution
遍历所有字符,返回字符串中的最大整数。
Code
1 | class Solution { |
1689. Partitioning Into Deci-Binary Numbers
https://xuanhe95.github.io/2022/06/27/1689-Partitioning-Into-Deci-Binary-Numbers/
