Zooko Journeyman <[EMAIL PROTECTED]>
writes
> ...
>> Honestly, would you use a language which does not allow to
>> program a depth-first graph traversal in O(n).
> Ah. I didn't realize it was that bad.
> ...
> But I've yet to implement a graph structure of any sort (as far
> as I can remember) and then try to traverse it efficiently.
> ...
> Of course, graph traversal, sorting and such algorithms are
> extremely important to a lot of work
> ...
At least, sorting is all right in Haskell - as in many other
languages. Merge sorting can be srcipted in 4-5 lines, the program
costs O( n*log(n) ), and one cannot code this any better, even,
say, in C.
Concerning the depth-first graph traversal, could you formulate
the task?
And if it costed, say, O( n*log(n) ), I think it would be almost
like O(n) - ?
------------------------------------
Sergey Mechveliani [EMAIL PROTECTED]