Skip to content

Effortlessly create binary tree test cases for LeetCode.

Notifications You must be signed in to change notification settings

scotthallock/binarytreebuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!)