Binary Search Trees

The binary search tree (BST) is a data structure that is much different from the other structures that we’ve gone over so far. Unlike stacks, queues, and lists, a BST’s struct is not a “straight-line”. Each node in a BST has a left and right child node.


Welcome back to the Digilent Blog! Today we’re going to go over recursion! Recursion is when a function calls itself directly, or through another function. Sometimes we can’t solve a problem using loops (iteration), so we have to use recursion. Recursion is slower than iteration, difficult to debug, and it uses up more of the stack. But recursion can also have simpler code, so in some cases, the benefits outweigh the problems.