algorithms/fundamentals/exrecises/union_find/test_find.go

12 lines
221 B
Go
Raw Normal View History

2021-11-22 23:39:33 +02:00
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)
}
}