in reply to Re^2: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
in thread Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
How do you concatenate n strings in O(log n)? Every string will have to be concatenated to something least once, so it's not obvious to me how it could ever be less than O(n).
Concatenating in pairs and then concatenating the results etc adds up to O(n).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
by akho (Hermit) on Aug 13, 2007 at 19:30 UTC | |
by Anonymous Monk on Feb 22, 2008 at 09:08 UTC |
In Section
Meditations