Short and easy LIS solution in Python with explanation
The solution is to compute the longest non-decreasing subsequence for the k sequences. \nThe sequence can be very long, thus the effient O(n log n) solution to 
The solution is to compute the longest non-decreasing subsequence for the k sequences. \nThe sequence can be very long, thus the effient O(n log n) solution to longest non-decreasing subsequence is required. \n\n```\nclass Solution:\n    def lis(self, start):\n        results = []\n        total = 0\n        for i in range(start, len(self.arr), self.k):\n            total += 1\n            if not results or results[-1] <= self.arr[i]:\n                results.append(self.arr[i])\n            else:\n                results[bisect_right(results, self.arr[i])] = self.arr[i]\n        return total - len(results)\n            \n    def kIncreasing(self, arr: List[int], k: int) -> int:\n        self.arr, self.k = arr, k\n        return sum(self.lis(i) for i in range(k))\n
['Binary Search', 'Python3']