On Tue, Dec 08, 2009 at 03:22:47PM -0800, ataggart wrote: >I would be very surprised if getting the first element from a sorted- >set wasn't ~O(1).
As has been mentioned, it probably isn't if the set is a tree. But, also, usually, in addition to getting the first element, we also are going to want a set without the first element to represent the rest of the data. Both a sorted-set and a priority-queue are probably O(log n) for the first/rest operation, but the constant factor is likely to be quite different. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
