error: cannot slove it. recursive call flatten(root-left), flatten(root-right) get the rightmost of root-left append root-right to rightmost of root-left assign root-left = nullptr
error:
cannot slove it.
- recursive call flatten(root->left), flatten(root->right)
- get the rightmost of root->left
- append root->right to rightmost of root->left
- assign root->left = nullptr