The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Algorithm::Sorting - Provide various sorting methods.

SYNOPSIS

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

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

Here, all subroutines have same syntax to use.

BubbleSort
        BubbleSort(\@array);
        print "@array\n";
ShakerSort
        ShakerSort(\@array);
        print "@array\n";
SelectionSort
        SelectionSort(\@array);
        print "@array\n";       
InsertionSort
        InsertionSort(\@array);
        print "@array\n";       
ShellSort
        ShellSort(\@array);
        print "@array\n";       
QuickSort
        QuickSort(\@array);
        print "@array\n";       

SEE ALSO

Algorithm 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.