caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Seth Fogarty <sfogarty@gmail.com>
To: skaller@users.sourceforge.net
Cc: caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] Re: Set and Map question
Date: Sun, 19 Sep 2004 23:18:34 -0500	[thread overview]
Message-ID: <c7ee6112040919211867048703@mail.gmail.com> (raw)
In-Reply-To: <1095652570.2580.298.camel@pelican.wigram>

Yes, sorry, sorted. I know it is possible, I was wondering if it was
implemented.


On 20 Sep 2004 13:56:10 +1000, skaller <skaller@users.sourceforge.net> wrote:
> On Mon, 2004-09-20 at 13:14, Seth Fogarty wrote:
> 
> > What I MEANT to ask is: Is there a O(n) method of set/map construction
> > from a list, as opposed to the O(n log n) fold method.
> 
> It seems to me that in general that is impossible,
> since random tree insertions are at least O(log n)
> in the tree size (proportional to depth).
> 
> Perhaps you meant, assuming the list is sorted?
> In that case, in theory you could precalculate
> the shape of the tree just from the size, and then
> fill in the elements in O(n).
> 
> --
> John Skaller, mailto:skaller@users.sf.net
> voice: 061-2-9660-0850,
> snail: PO BOX 401 Glebe NSW 2037 Australia
> Checkout the Felix programming language http://felix.sf.net
> 
> 



-- 
Seth Fogarty             sfogarty@gmail.com
Neep-neep at large    AIM: Sorrath
"I know there are people in this world who do not love their fellow
human beings - and I hate people like that" --Tom Lehrer.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-09-20  4:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20  2:37 [Caml-list] " Seth Fogarty
2004-09-20  3:14 ` [Caml-list] " Seth Fogarty
2004-09-20  3:56   ` skaller
2004-09-20  4:18     ` Seth Fogarty [this message]
2004-09-20  6:43       ` skaller
2004-09-20  8:32       ` Diego Olivier Fernandez Pons
2004-09-20  4:02   ` Brian Hurt
2004-09-20  8:17     ` Richard Jones
2004-09-20 12:41       ` Igor Pechtchanski
2004-09-20 12:54         ` Jean-Christophe Filliatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7ee6112040919211867048703@mail.gmail.com \
    --to=sfogarty@gmail.com \
    --cc=caml-list@pauillac.inria.fr \
    --cc=skaller@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).