you're not correctly generating numbers in your generating.pl
llefranc opened this issue · 1 comments
llefranc commented
for( $num = 0; $num < $stacksize; ) {
$n = int(srand() % ($max- $min) + $min);
if (!(grep { $_ eq $n } @stack)) {
push @stack, $n;
$num++;
}
}
this will fix the problem ;) you're still incrementing num even if the number already exist to avoid duplicate, so if you want to generate 100 number you will in fact generate something like 80 numbers !
otherwise your tester is really great :)
louisabricot commented
Thank you ! I had not seen this at all. Correction is on its way