Print root node at the end of traversal
document . write ( In [ inIndex ] + " " ) ; } function printPostMain ( In , pre ) { let n = pre . length ; let hm = new Map ( ) ; for ( let i = 0 ; i < n ; i ++ ) hm . set ( In [ i ] , i ) ; printPost ( In , pre , 0 , n - 1 , hm ) ; }