Skip to content

Instantly share code, notes, and snippets.

View ForgottenProgramme's full-sized avatar

Mahe Iram Khan ForgottenProgramme

View GitHub Profile
//JAVA CODE TO FIND THE LONGEST COMMON SUBSEQUENCE
//MAHE IRAM KHAN
//18COB058
public class LongestCommonSubsequence {
int lcs(char[] X, char[] Y, int p, int q)
{
if (p == 0 || q == 0)
return 0;
if (X[p - 1] == Y[q - 1])