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

Function BenchmarkAVLTree_Delete

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

Source from the content-addressed store, hash-verified

618}
619
620func BenchmarkAVLTree_Delete(b *testing.B) {
621 helper := func() {
622 tree := bt.NewAVL[int]()
623 for i := 1; i <= testNum; i++ {
624 tree.Push(i)
625 }
626
627 for i := 1; i <= testNum; i++ {
628 tree.Delete(i)
629 }
630 }
631
632 for i := 0; i < b.N; i++ {
633 helper()
634 }
635}

Callers

nothing calls this directly

Calls 2

PushMethod · 0.65
DeleteMethod · 0.65

Tested by

no test coverage detected