Skip to content

GlacialLake/binary-tree-visualization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binary-tree-visualization

summary

Draw a binary tree in the browser based on the pre-order traversal sequence (including empty leaves).

platforms and dependencies

It should work on any modern browser.

usage

You open index.html in any modern browser. The program needs two things to draw the tree. First, you enter the maximum number of nodes that each row can contain (so the program can adjust the node size). Second, you enter the pre-order traversal sequence, where non-empty nodes are positive integers and empty leaves are denoted by '#'.

For example, if you give the following input,

32

1 2 3 # # 4 # # 5 6 7 # # 8 # # #

you will get the following result.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published