## Notes Information

Login / Sign Up to View Document

## Sample Document Text

Binary Tree. A binary tree is either an empty tree or a tree comprising a root node, left subtree and a right subtree. This is an empty binary tree at right. Some more binary trees:
Single node binary tree. Two-node binary trees.
Seven-node binary tree.
Every binary tree can have at most two subtrees: left and right. The notion of parent, children, grandparent, grand-children. Basically,
parent
Left Child
Right child Child
A tree, if it’s not empty, begins at a root which is at level 0. The children of the root are at level 1, and their children are at the next level, and so on. The height of a tree is the maximum level that any of its node attains. Also, recursively,
height(tree) = 1 + max (height(tree.left), height(tree.right))
A complete binary tree is one where every node except those at the deepest layer (level) has precisely two children. Let n(h) = total number of nodes in a complete binary tree of height h. Then, n ( 0) = 1 n(h) = 1 + 2n(h − 1) This shows that n( h) = 1 + 21 + 2 2 + 2 3 +...

## Related Documents

On the Right Notes

On the Right Notes

On the Left Notes

On the Left Notes

On the Right Notes

On the Left Notes

Binary Search Notes

On the Left Notes

On the Left Notes

Binary Search Notes

On the Right Notes

On the Right Notes

On the Left Notes

On the Left Notes

On the Left Notes

On the Left Notes

© Copyright 2020 , Koofers, Inc. All rights reserved.

The information provided on this site is protected by U.S. and International copyright law, and other applicable intellectual property laws, including laws covering data access and data compilations. This information is provided exclusively for the personal and academic use of students, instructors and other university personnel. Use of this information for any commercial purpose, or by any commercial entity, is expressly prohibited. This information may not, under any circumstances, be copied, modified, reused, or incorporated into any derivative works or compilations, without the prior written approval of Koofers, Inc.