diff --git "a/leetcode2/1easy/\352\271\200\353\214\200\354\233\220/Q1689.java" "b/leetcode2/1easy/\352\271\200\353\214\200\354\233\220/Q1689.java" new file mode 100644 index 00000000..06cdb375 --- /dev/null +++ "b/leetcode2/1easy/\352\271\200\353\214\200\354\233\220/Q1689.java" @@ -0,0 +1,12 @@ +class Solution { + public int minPartitions(String n) { + int answer = 0; + int size = n.length(); + for (int i = 0; i < size; i++) { + if (n.charAt(i) - '0' == 0) continue; + answer = Math.max(answer, n.charAt(i) - '0'); + } + + return answer; + } +}