;;; heap.el --- heap (a.k.a. priority queue) data structure package
;; Copyright (C) 2004-2006, 2008 Toby Cubitt
;; Author: Toby Cubitt toby-predict...@dr-qubit.org
;; Version: 0.2.1
;; Keywords: heap, priority queue
;; URL: http://www.dr-qubit.org/emacs.php
;; This file is NOT part of
;;; heap.el --- heap (a.k.a. priority queue) data structure package
;; Copyright (C) 2004-2006 Toby Cubitt
;; Author: Toby Cubitt [EMAIL PROTECTED]
;; Version: 0.1.5
;; Keywords: heap, priority queue
;; URL: http://www.dr-qubit.org/emacs.php
;; This file is NOT part of Emacs.
;;
;; This
Your code has some problem w.r.t efficiency. The heap data-structure is
interesting for its complexity properties (e.g. heap-delete-root should be
O(log N)), but your code doesn't enjoy those properties:
(defun heap-add (heap data)
Add DATA to the heap.
;; Add data to bottom of heap and
On Sat, May 27, 2006 at 11:34:25AM -0400, Stefan Monnier wrote:
Your code has some problem w.r.t efficiency. The heap data-structure is
interesting for its complexity properties (e.g. heap-delete-root should be
O(log N)), but your code doesn't enjoy those properties:
Hmmm...yes, you're