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