Vipin Singh > Algorithm-0.05 > Algorithm

Download:
Algorithm-0.05.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.05   Source  

NAME ^

Algorithm - Provide bunch of famous Algorithms for Sorting and Searching.

SYNOPSIS ^

  use Algorithm;
  
  my @list=(1, "hello", 123, "abc");
    
  BubbleSort(\@list);
  print "@list\n"; #will print the sorted list.

  or

  use Algorithm;
  
  my @list=(1, "hello", 123, "abc");
  my $key="abc";
  
  #it will return index of the key if found, else -1
  my $index=SequentialSearch(\@list, $key);
  
  #it will return index of the if found, else -1. @list must be sorted.
  my $return=BinarySearch(\@list, $key); 

DESCRIPTION ^

In this module, there are many very general sorting Algorithms written for Perl. Those are

        Bubble Sort
        Shaker Sort
        Selection Sort
        Insertion Sort
        Shell Sort
        Quick Sort

And, there are two very general searching Algorithms(Sequential Search & Binary Search) written for Perl.

SEE ALSO ^

Algorithm::Sorting and Algorithm::Searching

AUTHOR ^

Vipin Singh, <qwer@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2013 by Vipin Singh

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.3 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: