If your solution doesn't require a formal architecture specification, you haven't solved the problem correctly.
Rendered by a custom 16-bit stack-based virtual machine with an instruction set designed specifically for this tree. 15 opcodes, 4 syscalls, 921 bytes of hand-assembled bytecode.