Tree

ninetynine.P58.Tree
object Tree

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Tree.type

Members list

Value members

Concrete methods

def symmetricBalancedTrees[T](n: Int, value: T): List[Tree[T]]

Generate all symmetric, completely balanced binary trees with the given number of nodes.

Generate all symmetric, completely balanced binary trees with the given number of nodes.

Value parameters

n

the number of nodes in the tree

value

the value to put in each node

Attributes

Returns

list of all symmetric, completely balanced binary trees with n nodes