@@ -0,0 +1,850 @@
+import java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.LinkedList;%0Aimport java.util.List;%0A%0A/**%0A * Created by Liuxz on 2017/5/9.%0A */%0Apublic class Leet77Combinations %7B%0A    public List%3CList%3CInteger%3E%3E combine(int n, int k) %7B%0A        List%3CList%3CInteger%3E%3E result = new ArrayList%3C%3E();%0A        loop(result,new ArrayList%3C%3E(), 1 , n, k);%0A        return result;%0A    %7D%0A    void loop(List%3CList%3CInteger%3E%3E result, List%3CInteger%3E vec, int input,int n, int k)%7B%0A        if(vec.size() == k)%7Bresult.add(new ArrayList%3C%3E(vec));return;%7D%0A        for (int i = input; i%3C=n;i ++)%7B%0A            vec.add(i);%0A            loop(result, vec, i+1,n,k);%0A            vec.remove(vec.size()-1);%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args)%7B%0A        Leet77Combinations xx = new Leet77Combinations();%0A        List%3CList%3CInteger%3E%3E result = xx.combine(4,3);%0A    %7D%0A%7D%0A

complete 77