Skip to content

Instantly share code, notes, and snippets.

@SanchitB23
Created August 31, 2018 04:32
Show Gist options
  • Save SanchitB23/f3046f656827ed20e8407e293c9a2767 to your computer and use it in GitHub Desktop.
Save SanchitB23/f3046f656827ed20e8407e293c9a2767 to your computer and use it in GitHub Desktop.
Justr shit code for understanding
//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