摘要:
Given an array of size n, find all the possible sub set of the array of size k(all the subsets must be of size k).Q:给一个大小为n的数组,输出其中k个数字的组合。A:void subarray(int arr[], int t[], int n, int index, int k, int kIndex) { int i; if (n == 0) return; if (kIndex == k) { // 说明已经取到了k个数字,打印出来 ... 阅读全文
posted @ 2011-12-19 14:16
百分百好牛
阅读(332)
评论(0)
推荐(0)