Help for this page

Select Code to Download


  1. or download this
    sub heap_lt { $_[1] < $_[2] };
    sub key_lt  { $_[1] lt $_[2] };
    sub key_gt  { $_[1] gt $_[2] };
    
  2. or download this
    package Algorithm::Treap;
    sub import { goto &Treap::import }
    1;
    package Treap;
    #...
    
  3. or download this
    use Algorithm::Treap;
    my $default=Treap->Tied_Hash(A => 121, B => 674, C => 970, D => 82, E 
    +=> 658, F => 957);
    $default->{D}=600;
    $default->{A}=500;
    
  4. or download this
    use Algorithm::Treap;
    my $rand=Random::Treap->Tied_Hash();
    $rand->{ja}="just another\n";
    $rand->{ph}="perl hacker\n";
    
  5. or download this
    use Algorithm::Treap IntKey =>
        #DEBUG=>1,
    ...
    $inttreap->{2}=5;
    $inttreap->{10}=5;
    print join(", ",keys %$inttreap),"\n";
    
  6. or download this
    tied(%$default)->dump_tree;
    
  7. or download this
     A=500-                     
       +--------------------+   
    ...
            B=674-               E=658-       
              +------+             +------+   
                   C=970                F=957