 |
Print all possible combinations of r elements in a given array of size n - GeeksforGeeks
public class Recurssion1 {public static void main(String[] args) {int[] a = {1, 2, 3, 4}; int k = 2; recurser(0, k, k, a, “”);} static void recurser(int start, int end, int limit, int[] array, String presentString) {if (presentString.length() == limit) {S
www.geeksforgeeks.org |
 |