LCS and some sorts