MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / getOptimalBSTTestCases

Function getOptimalBSTTestCases

dynamic/optimalbst_test.go:16–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14}
15
16func getOptimalBSTTestCases() []testCaseOptimalBST {
17 return []testCaseOptimalBST{
18 {[]int{10, 12, 20}, []int{34, 8, 50}, 3, 142}, // Example with 3 keys
19 {[]int{10, 20, 30, 40, 50}, []int{10, 20, 30, 40, 50}, 5, 300}, // Example with 5 keys
20 {[]int{10}, []int{100}, 1, 100}, // Single key case
21 }
22}
23
24func TestOptimalBST(t *testing.T) {
25 t.Run("Optimal Binary Search Tree test cases", func(t *testing.T) {

Callers 1

TestOptimalBSTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected