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

Method PostOrder

structure/tree/avl.go:107–111  ·  view source on GitHub ↗

PostOrder traverses the tree in the following order Left --> Right --> Root

()

Source from the content-addressed store, hash-verified

105
106// PostOrder traverses the tree in the following order Left --> Right --> Root
107func (avl *AVL[T]) PostOrder() []T {
108 traversal := make([]T, 0)
109 postOrderRecursive[T](avl.Root, avl._NIL, &traversal)
110 return traversal
111}
112
113// LevelOrder returns the level order traversal of the tree
114func (avl *AVL[T]) LevelOrder() []T {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected