已知:sa是前序遍历,sb是中序遍历 后序遍历: void PostOrder( string sa, string sb ) ... { if( sb.length() == 0 ) ...{ return; } if( sb.length() == 1 ) ...{ cout<<sb<<endl; return; } char x = sa[0]; int mid = sb.find(x); string c = sb.substr( 0, mid ); string d = sb.substr( mid+1 ); cal_tree( sa.substr(1, c.length()), c ); cal_tree( sa.substr(1+c.length()), d ); cout<<x;}