Why std.algorithm.sort can't be applied to char[]?
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 15 13:54:10 PDT 2014
On Thursday, 15 May 2014 at 17:46:52 UTC, Steven Schveighoffer
wrote:
>> As far as I'm concerned, if we *can* do it in n.log(n), and
>> somebody provides the implementation, then there is no reason
>> to not offer dchar sorting for char[]/wchar.
>
> I think there is nothing wrong with requiring the steps to be
> explicit. We should not hide such bloat behind sort.
>
> -Steve
Of course, but I meant if we could find an algoirthm O(1) (or
O(log(N)) space overhead.
If the only algorithm we are capable of providing just
temporarily dstrings, then no.
More information about the Digitalmars-d-learn
mailing list