Algorithm-Bitonic-Sort

 view release on metacpan or  search on metacpan

lib/Algorithm/Bitonic/Sort.pm  view on Meta::CPAN

	#~ return ($first, $second);
}


sub _some_sorting_algorithm {
	my $up = shift;
	my $single_bit = shift;
	my @num = @_;
	my @num_new;
	
	say "_SOME_SORTING_ALGORITHM: INPUT: ".Dumper(@num) if DEBUG;
	
	while (my $curr = shift @num) {
		say "_SOME_SORTING_ALGORITHM: for: ".Dumper($curr, $single_bit, @num) if DEBUG;
		if ($up and $single_bit < $curr) {
			push @num_new, $single_bit;
			push @num_new, $curr;
			say "Return earlier, up is ".($up or '0').':'.Dumper(@num_new, @num) if DEBUG;
			return (@num_new, @num);
		} elsif ($single_bit > $curr and not $up) {
			push @num_new, $single_bit;



( run in 0.289 second using v1.01-cache-2.11-cpan-4e96b696675 )