This will handle duplicate entries in the arrays differently than the hash solution.while( @sort_a and @sort_b ){ if( $sort_a[0] < $sort_b[0]){ shift(@sort_a); } elsif( $sort_a[0] > $sort_b[0]{ shift(@sort_b); } else{ push @new_array, $sort_a[0]; shift(@sort_a); shift(@sort_b); } }
In reply to Re: •SPOILERS Re: (OT) Interview questions -- your response?
by ichimunki
in thread (OT) Interview questions -- your response?
by Ovid
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |