MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkRBTree_Delete

Function BenchmarkRBTree_Delete

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

Source from the content-addressed store, hash-verified

570}
571
572func BenchmarkRBTree_Delete(b *testing.B) {
573 helper := func() {
574 tree := bt.NewRB[int]()
575 for i := 1; i <= testNum; i++ {
576 tree.Push(i)
577 }
578
579 for i := 1; i <= testNum; i++ {
580 tree.Delete(i)
581 }
582 }
583
584 for i := 0; i < b.N; i++ {
585 helper()
586 }
587}
588
589func BenchmarkAVLTree_Insert(b *testing.B) {
590 helper := func() {

Callers

nothing calls this directly

Calls 2

PushMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected