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

Function BenchmarkBSTree_Has

structure/tree/tree_test.go:508–523  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

506}
507
508func BenchmarkBSTree_Has(b *testing.B) {
509 helper := func() {
510 tree := bt.NewBinarySearch[int]()
511 for i := 1; i <= testNum; i++ {
512 tree.Push(i)
513 }
514
515 for i := 1; i <= testNum; i++ {
516 tree.Has(i)
517 }
518 }
519
520 for i := 0; i < b.N; i++ {
521 helper()
522 }
523}
524
525func BenchmarkBSTree_Delete(b *testing.B) {
526 helper := func() {

Callers

nothing calls this directly

Calls 2

PushMethod · 0.65
HasMethod · 0.65

Tested by

no test coverage detected