add new solutions

This commit is contained in:
Yiyang Kang 2026-03-01 13:45:00 +09:00
parent ee1868a10e
commit 2012261d3d
7 changed files with 205 additions and 0 deletions

View file

@ -0,0 +1,12 @@
// Package q1689 implements a solution for https://leetcode.com/problems/partitioning-into-minimum-number-of-deci-binary-numbers/
package q1689
func minPartitions(n string) int {
maxDigit := 0
for i := range len(n) {
maxDigit = max(maxDigit, int(n[i]-'0'))
}
return maxDigit
}
var _ = minPartitions