Live here: https://scotthallock.github.io/binarytreebuilder/
BinaryTreeBuilder is a tool which simplifies the creation of binary tree test cases for LeetCode. Build your tree with mouse clicks in the diagram or by inputting an array.
The tree diagram and tree array are updated together!
The array follows the format of LeetCode test cases:
The input [1,null,2,3] represents the serialized format of a binary tree using level order traversal, where null signifies a path terminator where no node exists below.
- 🖱️ With mouse clicks in the diagram:
- Add nodes
- Delete nodes
- Edit node values
- ⌨️ With your keyboard:
- Input an array in the format of a LeetCode binary tree test case
- 🌊 With the swiftness of a coursing river:
- Generate random trees, from 3 to 10 levels deep (up to 1023 nodes!)