Don't just run your test cases through your mind, visualize them instead! 😉
- Drawing 2D tree graphics using HTML
canvas
.
-
A node in canvas represents these properties
width
,height
,point (x,y)
,radius
, and the nodevalue
.
- Find the root node coordinates from
xStart
toxEnd
. - Draw the root node on the coordinates found at
step 1
. - Recursively draw left & right nodes.
- Connect edges of each nodes.
Vitejs
+TypeScript
Tailwind css