addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupsimageimagesinstagramlinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1outlookpersonJoin Group on CardStartprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

50 Algos in 50 Weeks: Implementing Binary search tree

In computer science, a binary search tree (BST), which may sometimes also be called an ordered or sorted binary tree, is a node-based binary treedata structure which has the following properties:[1]

  • The left subtree of a node contains only nodes with keys less than the node's key.
  • The right subtree of a node contains only nodes with keys greater than or equal to the node's key.
  • Both the left and right subtrees must also be binary search trees.

Generally, the information represented by each node is a record rather than a single data element. However, for sequencing purposes, nodes are compared according to their keys rather than any part of their associated records.

The major advantage of binary search trees over other data structures is that the related sorting algorithms and search algorithms such as in-order traversal can be very efficient.

Binary search trees are a fundamental data structure used to construct more abstract data structures such as setsmultisets, and associative arrays.

 

Join or login to comment.

  • B. H.

    I really enjoyed this meetup on Binary Trees. Andy gave a great, intuitive presentation good for people seeing this for first time and veterans.

    July 7, 2012

  • A former member
    A former member

    Had a great time. Focused very much on implementation after a brief overview of the basic structure.
    Bright and inquisitive group, questions and discussion even among those who already have this algorithm down pat.

    I didn't stick around for the coding bit, but will next time.

    June 29, 2012

50 went

Our Sponsors

  • Pivotal Labs

    Pivotal Labs

  • Vendavo

    Vendavo is the leader in front-line profit optimization

  • Wolfram Research

    Mathematica is the world's ultimate application for computations.

  • Yodle

    Local online advertising for small businesses.

  • Lyft

    Free ride credit to try the service. Fast and safe way to get around.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy