Write a program to count number of ways to calculate a target number from elements of specified array by using only addition and subtraction operator. The use of any other operator is forbidden. Get great deals at Amazon
In k-partition problem, we need to partition an array of positive integers into k disjoint subsets that all have equal sum and they completely covers the set.
Given a string and a pattern, determine if the pattern matches with the string or not. The solution should not use any regex.
Given a positive integer, find minimum number possible by doing at-most K swap operations upon its digits.
Given a positive number N, find all combinations of 2*N elements such that every element from 1 to N appears exactly twice and distance between its two appearances is exactly equal to value of the element.
In this post, we will see how to find all permutations of a string containing all distinct characters in C++.
Given a binary pattern that contains ‘?’ wildcard character at few positions, find all possible combinations of binary strings that can be formed by replacing the wildcard character by either 0 or 1.
Find the total number of unique paths which the robot can take in a given maze to reach the destination from given source.
Given a N x N matrix of positive integers, find a path from the first cell of the matrix to its last cell.
Given a rectangular path in the form of binary matrix, find the length of longest possible route from source to destination position of the matrix by moving to only non-zero adjacent positions i.e. route can be formed from positions having their value as 1. Note there should not be any cycles in the output path.