[ 
https://issues.apache.org/jira/browse/COLLECTIONS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Neidhart resolved COLLECTIONS-433.
-----------------------------------------

    Resolution: Fixed

Applied the patch with a few minor modifications and additional tests in 
r1470159:

 * minor formatting, variable renaming
 * TreeList.addAll now increases the modCount with the number of elements 
rather than just by one

Thanks for the patch!
                
> TreeList.addAll() complexity
> ----------------------------
>
>                 Key: COLLECTIONS-433
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-433
>             Project: Commons Collections
>          Issue Type: Improvement
>    Affects Versions: 3.2.1
>            Reporter: Adrian Nistor
>             Fix For: 4.0
>
>         Attachments: COLLECTIONS-433.patch, COLLECTIONS-433.v2.patch
>
>
> "TreeList.addAll(Collection coll)" has a higher complexity than
> necessary when "coll" is a "TreeList" object (because "addAll" just
> adds one element at a time).  This can be done in just O(N) as
> described for example here:
> http://stackoverflow.com/questions/4458489/merging-2-diferent-avl-trees
> Are there any plans to improve this?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to