From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Keeping a sorted list vs sorting at the end?
Date: Sun, 20 Aug 2006 11:45:09 +0200 [thread overview]
Message-ID: <20060820094509.GA323@first.in-berlin.de> (raw)
In-Reply-To: <44E7DD8E.1090707@email.sjsu.edu>
On Sat, Aug 19, 2006 at 08:57:02PM -0700, jean-david hsu wrote:
> Just wondering on the average if it is more efficient to take time to
> keep a list sorted as we insert or simply sort the list at the end?
>
[...]
Sort list at the end.
If you want to sort at insertion time, then
trees are the better technique.
In OCaml there are the Set and the Map module, which
may be useful to you.
It depends on what you want to do, what kind of datastructure/module
is best suited.
Ciao,
Oliver
next prev parent reply other threads:[~2006-08-20 9:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-20 3:57 jean-david hsu
2006-08-20 9:45 ` Oliver Bandel [this message]
2006-08-20 16:09 ` [Caml-list] " David Powers
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=20060820094509.GA323@first.in-berlin.de \
--to=oliver@first.in-berlin.de \
--cc=caml-list@inria.fr \
/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