Files
LeetCode-Go/template/BIT_test.go
2021-04-22 17:07:22 +08:00

13 lines
236 B
Go

package template
import (
"fmt"
"testing"
)
func Test_BIT(t *testing.T) {
nums, bit := []int{1, 2, 3, 4, 5, 6, 7, 8}, BinaryIndexedTree{}
bit.Init(8)
fmt.Printf("nums = %v bit = %v\n", nums, bit.tree) // [0 1 3 3 10 5 11 7 36]
}