Untitled

PHP boxlabs 3 Views Size: 193 bytes Posted on: Sep 6, 25 @ 12:14 AM
  1. 1array_fill(0,$n+1,array_fill(0,$m+1,0));
  2. 2 for($i=$n-1;$i>=0;$i--) for($j=$m-1;$j>=0;$j--) {
  3. 3 $L[$i][$j]=($Aw[$i]===$Bw[$j])?($L[$i+1][$j+1]+1):max($L[$i+1][$j],$L[$i][$j+1]);
  4. 4 }

Raw Paste

Comments 0
Login to join the discussion
  • No comments yet — be the first!
Login to post a comment. Login
We use cookies. To comply with GDPR in the EU and the UK we have to show you these.

We use cookies and similar technologies to keep this website functional (including spam protection via Google reCAPTCHA), and — with your consent — to measure usage and show ads. See Privacy.