scotthallock / binarytreebuilder

Effortlessly create binary tree test cases for LeetCode.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BinaryTreeBuilder

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.

What you can do

  1. 🖱️ With mouse clicks in the diagram:
    • Add nodes
    • Delete nodes
    • Edit node values
  2. ⌨️ With your keyboard:
    • Input an array in the format of a LeetCode binary tree test case
  3. 🌊 With the swiftness of a coursing river:
    • Generate random trees, from 3 to 10 levels deep (up to 1023 nodes!)

About

Effortlessly create binary tree test cases for LeetCode.


Languages

Language:JavaScript 61.2%Language:HTML 19.5%Language:CSS 19.4%