Start from the rightmost node , traverse back using left pointers . While traversing , change right pointer of nodes .
while ( root && root -> left != NULL ) { prev = root ; root = root -> left ; root -> right = prev ; }