// prev = NULL, pt = NULL
void fixSwapNode(Node* curr, Node* prev, Node* pt1, Node* pt2, Node* pt){
if(pt == NULL)
pt = curr;
if(curr){
fixSwapNode(curr->left, prev, pt1, pt2, pt);
if(prev){
if(pt1 == NULL && pt2 == NULL && prev->data > curr->data){
pt1 = prev;
pt2 = curr;
}else if(pt1 != NULL && pt2 != NULL && prev->data > curr->data){
pt2 = curr;
}
}
fixSwapNode(curr->right, curr, pt1, pt2, pt);
}
if(pt == curr){
int tmp = pt1->data;
pt1->data = pt2->data;
pt2->data = tmp;
}
}