






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
During the course work of the Biological and Cognitive Sciences, we study many important concept of the cognitive sciences, the key points are:Recursing, Algorithm Requires, Divide-And-Conquer, Smaller Problems, Larger Problem, Finding, Definition, Recursive Algorithm, Maximum Element, Array
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







Docsity.com
Docsity.com
sub maxer { my $thing = shift; my $length = @$thing; if ($length == 1) { # one thing is its own max! return $thing->[0]; } else { # split into two arrays! my $size = @$thing; my $mid = int($size/2); my $bot = [@$thing[0..$mid-1]]; my $top = [@$thing[$mid..$size-1]]; my $sbot = &maxer($bot); my $stop = &maxer($top); if ($sbot<$stop) { return $stop; } else { return $sbot; } } } Pasted from Finding the maximum Docsity.com
Docsity.com
one root 0 or more children each child is the root of a tree. N-ary tree:
Docsity.com
Docsity.com
$company->{foo}->{bar} is the children of bar, that must be a child of foo. Docsity.com