O'Reilly logo

Swift Functional Programming - Second Edition by Dr. Fatih Nayebi

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

Binary Search Trees

Our assumption in our simple Tree was that only leaves contain a value. This is not always true. In fact, there are different types of Tree with different utilities, and Binary Search Tree (BST) is one of them.

In computer science, BSTs, sometimes called ordered or sorted binary trees, are a particular type of container: data structures that store items (such as numbers, names, and so on) in memory. They allow fast lookup, the addition and removal of items, and implementation of either dynamic sets of items or lookup tables that allow finding an item by its key (for example, finding the phone number of a person by name).

BSTs keep their keys in sorted order so that lookup and other operations can use the principle of binary ...

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