|
|
Warp escribió:
> Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
>> In Java, if you sort a linked list (or any collection with linear lookup
>> time), it copies the whole contents into an array, sorts it, and copies
>> the sorted results back to the structure you were using.
>
> Why? C++ supports sorting of its linked list data structure, and it
> does so in-place, without the need for additional memory and without
> having to copy elements around. And it's very fast.
I said how it works, it wasn't my idea :D
http://ln-s.net/1jjA
Post a reply to this message
|
|