Skip to content

Commit

Permalink
Fixing a performance bug in merge
Browse files Browse the repository at this point in the history
  • Loading branch information
amanjpro committed Mar 15, 2015
1 parent f4cbae5 commit 87c8b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree/AATree.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ sealed abstract class AATree[+T: Ordering] {
if(this == Empty) that
else if(that == Empty) this
else {
left.merge(right.merge(that)).insert(value)
(right.merge(that)).merge(left).insert(value)
}


Expand Down

0 comments on commit 87c8b04

Please sign in to comment.