MCPcopy
hub / github.com/TheAlgorithms/Go / BenchmarkBSTree_Delete

Function BenchmarkBSTree_Delete

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

Source from the content-addressed store, hash-verified

523}
524
525func BenchmarkBSTree_Delete(b *testing.B) {
526 helper := func() {
527 tree := bt.NewBinarySearch[int]()
528 for i := 1; i <= testNum; i++ {
529 tree.Push(i)
530 }
531
532 for i := 1; i <= testNum; i++ {
533 tree.Delete(i)
534 }
535 }
536
537 for i := 0; i < b.N; i++ {
538 helper()
539 }
540}
541
542func BenchmarkRBTree_Insert(b *testing.B) {
543 helper := func() {

Callers

nothing calls this directly

Calls 2

PushMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected