Skip to content

TreeSwift v1.1.44

Compare
Choose a tag to compare
@niemasd niemasd released this 26 Jun 20:16
· 6 commits to master since this release
  • Updated MRCA algorithm to be faster when the MRCA is relatively lower in the tree
    • Before, when looking for the MRCA of n nodes, I would do a complete upward traversal for the first n-1 nodes, and on the n-th upward traversal, I would stop the moment I found a node that's been visited n times (which is the MRCA)
    • Now, I use a queue to explore the tree upwards from the given nodes until finding a node that has been visited n times