Difference between full and full binary tree

Asked

Viewed 12,017 times

7

What is the difference between a full binary tree and a full binary tree?

3 answers

9


Definition of Prof. Adriano Cruz from UFRJ that I believe is very quiet to understand:

A strictly binary tree is a binary tree in which each node has 0 or 2 children. A binary tree full is a tree in which one node has some empty subtree so it is on the last level.

A tree complete is the one in if n is a knot with some sub-trees empty, then n is located in the penultimate or in the last level. Therefore, every full tree is complete and strictly binary.

Full (Full Tree)

inserir a descrição da imagem aqui

Complete (Complete Tree)

inserir a descrição da imagem aqui

  • @Matheus kkkkk , mai se respondeu primeiro... Rapido no trigger... Nice...

  • @Magichat kkkkkk what a coincidence! + Upvote for you! Answered right boss :-D

5

Kind of boss:

Binary tree full : is a tree in which each node in the tree has 0 or 2 child nodes(or leaves).

Árvore Binária Cheia

Binary tree complete : in a binary tree complete all levels except possibly the last , is completely full, and all nodes in the last level are as far left as possible.

inserir a descrição da imagem aqui

Thus it is clear to understand the term, "as far left as possible". Otherwise, the nodes will overlap.

3

I think the full binary tree definition given by Magichat is incorrect, because the full binary tree cannot have node with zero children before the last level and its answer leaves open this alternative, but the image actually represents a full binary tree, Look at the definition of the data structure book and its algorithms, 2nd. Editing. "A full binary tree is one in which, if v is a node with some of its empty sub-trees, then v is located on the last level. It follows that every full binary tree is complete and strictly binary." inserir a descrição da imagem aqui

  • I did not understand the criticism to the previous answer. It has how to reinforce with an image?

  • picture inserted, was not critical, just a correction, based on the book that I am reading at this time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.