Created
August 31, 2018 04:32
-
-
Save SanchitB23/f3046f656827ed20e8407e293c9a2767 to your computer and use it in GitHub Desktop.
Justr shit code for understanding
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//c= for value; | |
//b for arrow; | |
//Longest Common SubSequence | |
for(i){ | |
for(j){ | |
if(xi==yj){ | |
c[i,j]=c[i-1,j-1]+1; | |
b=// | |
} | |
else if(c[i-1,j]>=c[i,j-1]){ | |
c[i,j]=c[i-1,j]; | |
b=// | |
} | |
else{ | |
c[i,j]=c[i,j-1]; | |
b=// | |
} | |
} | |
} | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment