package hackerrank;

import java.util.Scanner;

/**
 * https://www.hackerrank.com/challenges/dynamic-programming-classics-the-longest-common-subsequence
 */
public class TheLongestCommonSubsequence {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // TODO
    }
}

@@ -202,108 +202,546 @@
    p
-ublic static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        // TODO
+rivate static void longestCommonSubsequence(int%5B%5D array1, int%5B%5D array2) %7B%0A        // TODO%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        int n = in.nextInt();%0A        int m = in.nextInt();%0A        int%5B%5D array1 = new int%5Bn%5D;%0A        for (int i = 0; i %3C n; i++) %7B%0A            array1%5Bi%5D = in.nextInt();%0A        %7D%0A        int%5B%5D array2 = new int%5Bm%5D;%0A        for (int i = 0; i %3C m; i++) %7B%0A            array2%5Bi%5D = in.nextInt();%0A        %7D%0A        longestCommonSubsequence(array1, array2);
 %0A   

Update Longest Common Subsequence