algorithms/fundamentals/exrecises/union_find/test_find.go
2021-11-22 23:39:33 +02:00

11 lines
221 B
Go

package unionfind
import "log"
func testFind(i implementation) {
qf := i.create(2)
if qf.Find(0) != 0 || qf.Find(1) != 1 {
log.Fatalf("%v Before union all sites belongs to component with same number", i.name)
}
}