oldk1331 wrote:
>
> Currently the Rep of Queue is List, thus enqueue! an
> element into the end of list is O(n) not O(1):
Yes.
> So I changed the Rep, the patch is here for you to review.
> If this patch is OK, I'll do the similar change for Dequeue.
There is one thing which may be problematic: your patch changes
order in which map processes elements. AFAICS classic version
which keeps pointer to the last element does not have this problem.
Also in description of 'rotate!' it is probably better to wrote:
"(enqueue!(dequeue!(q)); q)".
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.