You are provided with an array of size 8*N and you are provided a permutation of 8*N consecutive integers comprising of all the elements from ‘a’ to ‘a + 7*N ‘. Your Read more →
Backtracking
4 postsGiven two numbers n and m, generate all distinct subsequences of length m using numbers from 1 to n. You may repeat a number. INPUT: n=5, groups=3 OUTPUT: 1,1,3 1,2,2 1,3,1 2,1,2 Read more →
Amanada, a school kid, is learning English alphabets. Her teacher devised a small game to make the task fun. A grid of ‘m’ rows and ‘n’ columns is filled with English alphabets. Read more →
Backtracking is an algorithm that searches for possible combinations in order to solve computational problems. It is used for solving problems recursively by building increments and removing solutions that do not satisfy Read more →