ByteDance Interview Question

coding: Binary tree preorder traversal