11 lines
218 B
Go
11 lines
218 B
Go
package unionfind
|
|
|
|
import "log"
|
|
|
|
func testCount(i implementation) {
|
|
qf := i.create(10)
|
|
|
|
if qf.Count() != 10 {
|
|
log.Fatalf("%v: Before any union number of components should be equal to number of sites", i.name)
|
|
}
|
|
}
|