https://codility.com/honeypot/Perl_is_Perls-Perl-test-1 Here comes the codes I come up with, thanks for all your explanation of linked list data structure :
sub solution
{
my ($L)=@_;
my $count=1;
while($L=$L->{'next'})
{
$count++;
last if $L->{'value'} eq 'undef';
}
return $count;
}
In reply to Perl linked list by Perl_is_Perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |