ByteDance interview question

coding assignment for postorder of a tree