Files
LeetCode-Go/leetcode/0528.Random-Pick-with-Weight/528. Random Pick with Weight_test.go
2020-08-07 17:06:53 +08:00

18 lines
437 B
Go

package leetcode
import (
"fmt"
"testing"
)
func Test_Problem528(t *testing.T) {
w := []int{1, 3}
sol := Constructor528(w)
fmt.Printf("1.PickIndex = %v\n", sol.PickIndex())
fmt.Printf("2.PickIndex = %v\n", sol.PickIndex())
fmt.Printf("3.PickIndex = %v\n", sol.PickIndex())
fmt.Printf("4.PickIndex = %v\n", sol.PickIndex())
fmt.Printf("5.PickIndex = %v\n", sol.PickIndex())
fmt.Printf("6.PickIndex = %v\n", sol.PickIndex())
}