Python, LIS solution with explanation
IntuitionIn arr, we have k groups.
In a group, its element's index % k is the same.Approachwe just find each group's length of LIS,
and len(arr) - sum of length
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
In ```arr```, we have ```k``` groups.
In a group, its element's ```index % k``` is the same. 

# Approach
<!-- Describe your approach to solving the problem. -->
we just find each group's length of LIS,
and len(arr) - sum of length of each group's LIS is number of operation we should make.


# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
O(nlogn)

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
O(n)

# Code
```python3 []
class Solution:
    def kIncreasing(self, arr: List[int], k: int) -> int:
        seqs = [[] for _ in range(k)]
        for i, x in enumerate(arr):
            mod = i % k
            if not seqs[mod] or x >= seqs[mod][-1]:
                seqs[mod].append(x)
                continue
            pos = bisect.bisect_right(seqs[mod], x)
            seqs[mod][pos] = x
        return len(arr) - sum(len(x) for x in seqs)
```
['Binary Search', 'Python3']