O'Reilly logo

Joe Celko's Trees and Hierarchies in SQL for Smarties, 2nd Edition by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Binary Trees
Binary trees are a special case of trees in which each parent can have at most only two children that are ordered. There are no children, a left child, a right child, or both a left and a right child at each node. Binary trees are the subject of many chapters in data structures books because they have such nice mathematical properties. For example, the number of distinct binary trees with (n) nodes is called a Catalan number and is given by the formula ((2n)!/((n + 1)!n!)).
Keywords: complete binary tree, perfect binary tree, balanced binary tree, balanced binary search tree, AVL tree, height-balanced tree, Fibonacci tree, postorder traversal, preorder traversal, inorder traversal, heaps, Stern–Brocot numbers
Binary trees ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required