From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p5UJDYPb023735 for ; Thu, 30 Jun 2011 21:13:43 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvABAOvJDE5KfVK2kGdsb2JhbAA8AQMSp1IIFAEBAQEJCQ0HFAQhiHqiMowggkuENTmIaAIDBoYrBJIvhHaBHIYKPINY X-IronPort-AV: E=Sophos;i="4.65,454,1304287200"; d="scan'208";a="102297420" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 Jun 2011 21:13:42 +0200 Received: by wyg24 with SMTP id 24so3168599wyg.27 for ; Thu, 30 Jun 2011 12:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=3h9434YzKmUSTM60mw1ACdPKh4kuNZYcXELr3FtVO9Y=; b=cwUeqj9SzMKO/GDIbA+xdB/guckMaT8pSTvJbtfMJTWTd3xGMmlV22U4OkO1ahxSwi 48r5DcUoxs/44ty4Mer+B7DrEBEbyRzRzAOaQJt7R36ZH4nYfDTwmy5FRj9ZCjlf+Ymi W/jHS2Qfpj4biBrmb60/8Hs7pZXJQGb2obuZo= Received: by 10.227.28.206 with SMTP id n14mr2215873wbc.4.1309461222582; Thu, 30 Jun 2011 12:13:42 -0700 (PDT) Received: from [192.168.1.187] (106.165.7.93.rev.sfr.net [93.7.165.106]) by mx.google.com with ESMTPS id fi5sm1839907wbb.22.2011.06.30.12.13.40 (version=SSLv3 cipher=OTHER); Thu, 30 Jun 2011 12:13:41 -0700 (PDT) Message-ID: <4E0CCAE6.4050709@gmail.com> Date: Thu, 30 Jun 2011 21:13:42 +0200 From: Andrew User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Gabriel Scherer CC: caml-list@inria.fr References: <4E0CAEC3.7010804@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Priority queues, reloaded Gabriel Scherer a écrit : > The heap implementation in the OCaml manual, which was pointed to in the precedent thread, is quite compact. > > Okasaki (eg. in its book "Purely functional data structure", but can probably be found in papers available on the net) > has a "leftist heap" data structure that is also compact and, to my personal taste, easier to understand, get familiar > with and remember than the usual heap implementation -- or more exotic heaps. I was once in a situation similar to yours > and found that I could implement both his leftist heap and the red-black trees in around 15 minutes. > Did you need red-black trees, though, during the exam?