#include <iostream> #include <string> using namespace std; string s1, s2; struct node { char val; struct node *left, *right; node() {} node(char _v) : val(_v) {} }; node *build(int leftPre, int rightPre, int leftIn, int rightIn) { if (leftPre == rightPre) return nu...