Re: [m-users.] lists and sets, unordered or ordered.

"Zoltan Somogyi" <[email protected]>
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
On 2023-10-04 07:55 +11:00 AEDT, "Sean Charles (emacstheviking)" <[email protected]> wrote:
> Indeed. nothing in my drafts folder and I swear it was complete before I hit send... well,
> basically,
> is there a reason you can't get an unsorted de-duped list from a set?

Yes, there is. The reason is that any algorithm to remove duplicates
from an unsorted list will either

- sort the list (which is O(n log n), or
- have worse efficiency than an algorithm that sorts the list.

Zoltan.
_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.