Finished LIS and LCS