Skip to content

Commit

Permalink
Correct _pullUpLeftMost
Browse files Browse the repository at this point in the history
  • Loading branch information
chdemko committed Apr 9, 2014
1 parent 3e73a17 commit 3dbbb6a
Show file tree
Hide file tree
Showing 2 changed files with 484 additions and 102 deletions.
8 changes: 6 additions & 2 deletions src/SortedCollection/TreeNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -557,20 +557,24 @@ private function _pullUpLeftMost()
if ($this->information & 1)
{
$this->right->left = $this->left;

return $this->right;
}
else
{
if ($this->left->right == $this)
{
$this->left->information &= ~ 1;

return $this->right;
}
else
{
$this->right->information &= ~ 2;

return $this->left;
}
}

return $this->right;
}
}

Expand Down
Loading

0 comments on commit 3dbbb6a

Please sign in to comment.