Created
May 27, 2021 04:47
-
-
Save Jibbscript/75f9192f824b07547db797707f022b57 to your computer and use it in GitHub Desktop.
Partitioning Into Minimum Number Of Deci-Binary Numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def minPartitions(self, n: str) -> int: | |
| for i in range(9, -1, -1): | |
| if str(i) in n: | |
| return i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment