LCS and Modified Binary Sort