package leetcode;

/**
 * https://leetcode.com/problems/partitioning-into-minimum-number-of-deci-binary-numbers/
 */
public class Problem1689 {
    public int minPartitions(String n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1689 prob = new Problem1689();
        System.out.println(prob.minPartitions("32")); // 3
        System.out.println(prob.minPartitions("82734")); // 8
        System.out.println(prob.minPartitions("27346209830709182346")); // 9
    }
}

@@ -190,38 +190,28 @@
     
-// TODO%0A        return
+int answer =
  0;%0A    
 %7D%0A%0A 
@@ -210,299 +210,125 @@
     
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem1689 prob = new Problem1689();%0A        System.out.println(prob.minPartitions(%2232%22)); // 3%0A        System.out.println(prob.minPartitions(%2282734%22)); // 8%0A        System.out.println(prob.minPartitions(%2227346209830709182346%22)); // 9
+for (char c : n.toCharArray()) %7B%0A            answer = Math.max(answer, c - '0');%0A        %7D%0A        return answer;
 %0A   

Solve problem 1689