From c0ff5cbde3a1d83d81b9729530dcebc5dbce75ac Mon Sep 17 00:00:00 2001 From: dae won Date: Wed, 9 Jul 2025 10:29:56 +0900 Subject: [PATCH] Day08 --- .../\352\271\200\353\214\200\354\233\220/Q1689.java" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "leetcode2/1easy/\352\271\200\353\214\200\354\233\220/Q1689.java" 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; + } +}