/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } }; */ #include <cstring> #include <string> class Solution { public: void SerializeFun(TreeNode* root, string& str){ ...