Back to Freecodecamp

Step 6

curriculum/challenges/english/blocks/learn-tree-traversal-by-building-a-binary-search-tree/65c4f09e074dd8d37830ea00.md

latest553 B
Original Source

--description--

Create another empty class called BinarySearchTree that represents a binary search tree.

--hints--

You should have a class named BinarySearchTree. Remember to use the pass keyword.

js
({
  test: () => {
    assert(runPython(`
      import inspect
      inspect.isclass(BinarySearchTree)
    `));
  }
})

--seed--

--seed-contents--

py
class TreeNode:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

--fcc-editable-region--

--fcc-editable-region--