Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Partitioning Deci-binary numbers
class Solution {
public int minPartitions(String n) {
int maximum = 0;
for (char c : n.toCharArray()) {
maximum = Math.max(maximum, c - '0');
return maximum;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment