Kali ini akan saya share source code nya, monggo ....
$list = $tail = undef;
foreach (1..5) {
my $node = [ undef, $_ * $_ ];
$list = undef;
$tail = \$list; #tail linklist nya
foreach (1..5) {
my $node = [ undef, $_ * $_ ];
$$tail = $node; #tail = node setelah linklist terisi
$tail = \$node->[NEXT]; #isi linklist berikutnya
}
}
nah, terima kasih, semoga bermanfaat :)
No comments:
Post a Comment