This commit is contained in:
2026-03-05 11:21:54 +08:00
parent 035120f931
commit ed9ac364a8
6 changed files with 22 additions and 14 deletions
-11
View File
@@ -1,11 +0,0 @@
package A
func minCost(n int, edges [][]int) int {
edgeM := make([][]int, n)
for i := 0; i < n; i++ {
edgeM[i] = make([]int, n)
}
for _, e := range edges {
edgeM[e[0]][e[1]] = e[2]
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
package A
package main
import (
"slices"
+1 -1
View File
@@ -1,4 +1,4 @@
package A
package main
func numSpecial(mat [][]int) int {
res := 0
+1 -1
View File
@@ -1,4 +1,4 @@
package A
package main
func minPartitions(n string) int {
res := 0
+16
View File
@@ -0,0 +1,16 @@
package main
func minOperations(s string) int {
a := 0
for i := 0; i < len(s); i++ {
expected := byte('0' + i%2)
if s[i] == expected {
a++
}
}
b := len(s) - a
if a < b {
return a
}
return b
}
+3
View File
@@ -0,0 +1,3 @@
module git.wolves.top/lc
go 1.25.0