LIS Dynamic programming method...