[Java] Clean LC-300 LIS version with Collections.binarySearch
\nclass Solution {\n    private int lis(List<Integer> nums) {\n        List<Integer> sub = new ArrayList<>();\n        sub.add(nums.get(0));\n        \n        
```\nclass Solution {\n    private int lis(List<Integer> nums) {\n        List<Integer> sub = new ArrayList<>();\n        sub.add(nums.get(0));\n        \n        for (int i = 1; i < nums.size(); i++) {\n            int num = nums.get(i);\n            if (num >= sub.get(sub.size() - 1)) {\n                sub.add(num);\n            } else {\n                int j = Collections.binarySearch(sub, num) + 1;\n                if (j < 0) {\n                    j = -(j + 1) + 1;\n                }\n                sub.set(j, num);\n            }\n        }\n        return sub.size();\n    }\n    \n    public int kIncreasing(int[] arr, int k) {\n        int total = 0;\n        \n        for (int i = 0; i < k; i++) {\n            List<Integer> nums = new ArrayList<>();\n            for (int j = i; j < arr.length; j += k) {\n                nums.add(arr[j]);\n            }\n            total += nums.size() - lis(nums);\n        }\n        return total;\n    }\n}\n```
['Binary Tree', 'Java']