Skip to content
A priority queue data structure for Perl 6
Perl 6
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
t
.travis.yml
LICENSE
META.info
META6.json
README.md

README.md

NAME

PriorityQueue

VERSION

0.01

SYNOPSIS

    use PriorityQueue;

    my $p = PriorityQueue.new;

    for 1 .. 100 {
        $p.push: 100.rand.floor;
    }

    # should return in increasing order
    while $p.shift -> $e {
        say $e;
    }

    # if you want a max heap, or just a different ordering:
    $p = PriorityQueue.new(:cmp(&infix:«>=»));

DESCRIPTION

This class implements a priority queue data structure.

AUTHOR

Rob Hoelz

You can’t perform that action at this time.