TreeNode *rightRotate(TreeNode *in)
    {
    TreeNode * one = in->left;
    TreeNode * two = one->right;
    one->right = in;
    in->left = two;
    return one;
    }
  
  TreeNode *leftRotate(TreeNode * in)
    {
    TreeNode * one = in->right;
    TreeNode * two = one->left;
    one->left = in;
    in->right = two;
    return one;
    }