摘要:
Given an expression remove the unnecessary brackets in it without creating an ambiguity in its execution.input outputex1: (a+(b)+c) => a+b+cex2: (a*b)+c => a*b+c 阅读全文
摘要:
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个数字,打印出来 ... 阅读全文