练习6.1: 为bit数组实现下面这些方法 func (*IntSet) Len() int // return the number of elements func (*IntSet) Remove(x int) // remove x from the set func (*IntSet) Clear() // remove all elements from the set func (*IntSet) Copy() *IntSet // return a copy of the set…
题1.给定一个int数组,一个数sum,求数组中和为sum的任意2个数的组合 @Test public void test_find2() { int[] arr = { -1, 0, 2, 3, 4, 7, 8, 9, 10 }; int sum = 9; Arrays.sort(arr); List<TwoTuple<Integer, Integer>> result = new ArrayList<>(); int i = 0; int j = arr.lengt…