ByteDance Interview Question

coding assignment for postorder of a tree