数组多叉树递归遍历

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

sub find_max_nest{
        my($arr_name)=@_;
        $nest_counter++;
        if($nest_counter>$max_nest){
        	$max_nest=$nest_counter;
        }
        if($$arr_name[0] eq undef){
        	$nest_counter--;
        }else{
        	foreach $temp(@$arr_name){
        		find_max_nest($temp);
        	}
        	$nest_counter--;
        }
}