driver code to check the above function
public static void Main ( ) { int k = 4 ; string s1 = " aggasdfa " ; string s2 = " aggajasdfa " ; Console . WriteLine ( longestSubsequenceCommonSegment ( k , s1 , s2 ) ) ; } }