I have a mental blockade and i need to do this in the next hour. I need to rewrite this in a more simpler form but however i substitute the variables i get the same number of lines being executed:
so there are 3 conditions which are very similar in fact the first two are the same with opposite variables.if($l<$k){ if($s_rev[$d+1]==0 && $k-2>0){ $s_rev[$d+1] = $k-2; } $h=$s[$b] == 0 ? 0 : $s[$b]-1; $s[$b1] = max($k,$lt); $c=2; $j++; } elsif($l>$k){ if($s[$b+1]==0 && $l-2>0){ $s[$b+1] = $l-2; } $h=$s[$b] == 0 ? 0 : $s[$b]-1; $s[$b1] =max($l,$kt); $c=1; $i++; } else{ if($s[$b+1]==0 && $k-2>0){ $s[$b+1] = $k-2; } $s[$b1] = max($k,$lt); $h=0; $c=0; } sub max{ }
Thank you !
Update: all variables are numbers or number arrays. moreover, they are integers. So this is a procedure that a nee to write down as pseudo code with as less executable lines as possible
thank for the reply ww
In reply to reducing the number of lines by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |