Java Simple Solution || Binary Search || O(Nlogn)
\nclass Solution {\n    public int kIncreasing(int[] arr, int k) {\n        int n=arr.length;\n        int ans=0;\n        for(int i=0; i<k; i++)\n        {\n  
```\nclass Solution {\n    public int kIncreasing(int[] arr, int k) {\n        int n=arr.length;\n        int ans=0;\n        for(int i=0; i<k; i++)\n        {\n            ArrayList<Integer> list=new ArrayList();\n            for(int j=i; j<n; j=j+k)\n                list.add(arr[j]);\n            ans+=list.size()-LIS(list);\n        }\n        return ans;\n    }\n    static int LIS(ArrayList<Integer> list)\n    {\n        int n=list.size();\n        ArrayList<Integer> ans=new ArrayList();\n        for(int i=0; i<n; i++)\n        {\n            if(ans.size()==0 || ans.get(ans.size()-1)<=list.get(i))\n                ans.add(list.get(i));\n            else\n                ans.set(bin(ans,0,ans.size()-1,list.get(i)),list.get(i));\n        }\n        return ans.size();\n    }\n    static int bin(List<Integer> list,int low,int high,int key)\n    {\n        int mid;\n        while(low<=high)\n        {\n            mid=low+(high-low)/2;\n            if(list.get(mid)<=key)\n                low=mid+1;\n            else\n                high=mid-1;\n        }\n        return low;\n    }\n}\n```
[]