...

/

BST Operations: Playground (Part 1)

BST Operations: Playground (Part 1)

Implement generic BST algorithms in C.

Implementing the operations

Welcome to the first playground lesson where you’ll implement the pseudocode from the previous lesson.

We’ll first briefly go over the functions that you need to implement. Then, you can start implementing them in the code widget below.

Helper functions

Before implementing any algorithms, you should implement two helper functions.

  • allocNode will allocate a new node inside the generic tree.
    • We suggest accepting a value void* that you’ll use to initialize the value field inside the node. The expectation is that the caller of allocNode will provide freshly dynamically allocated memory,
...