m-ary tree

An m-ary tree in computer science is defined as a collection of nodes normally represented hierarchically in the following manner.

  • The tree is started at the root node.
  • Each node of the tree maintains a list of pointers to its child nodes.
  • The number of child nodes is less than or equal to m.

A typical representation of m-ary tree implements an array of m references (or pointers) to store children (Note that m is an upper bound on number of children).

An m-way search tree

a. is empty or

b. consists of a root containing b (1

Image of m-ary Tree

The height of a complete m-ary tree associated with n nodes is ceiling(logmn).

A B-tree of order m is an m-way tree in which

a. all leaves should be on the same level and

b. all nodes except for the root and the leaves have minimum m/2 children and maximum m children. The root has minimum 2 children and maximum m children.

Updated on: 2020-01-02T06:50:47+05:30

3K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements