Given a stair case, find total number of ways to reach the n’th stair from bottom of the stair when a person is only allowed to take at-most m steps at a time.
Given a stair case, find total number of ways to reach the n’th stair from bottom of the stair when a person is only allowed to climb either 1 or 2 or 3 stairs at a time.
Calculate total number of ways to achieve given sum with n throws of dice having k faces.
Given a string and a pattern containing wildcard characters, write an efficient algorithm to check if the input string matches with the wildcard pattern or not.
In Pots of gold game, there are two players A & B and pots of gold arranged in a line, each containing some gold coins. The players can see how many coins are there in each gold pot and each player gets alternating turns in which the player can pick a pot from one of …
Given a string, find minimum cuts needed to partition it such that each partition is a palindrome.
3-partition problem: Given a set S of positive integers, determine if it can be partitioned into three disjoint subsets that all have same sum and they cover S.
Given a linear equation of k variables, count total number of possible solutions of it.
Given three strings, return true if third string is interleaving of first and second string. i.e., it is formed from all characters of first and second string and order of characters is preserved.
A string is K-Palindrome if it becomes a palindrome on removing at most k characters from it. Write an algorithm to check if a given string is K-Palindrome or not.
Given a mobile keypad having digits from [0-9] associated with each key, count total possible combinations of digits having length n. We can start with any digit and press only four adjacent keys of any digit. Keypad also contains * and # key which we are not allowed to press.
The longest common subsequence (LCS) problem is the problem of finding the longest subsequence that is present in given two sequences in the same order. i.e. find a longest sequence which can be obtained from the first original sequence by deleting some items, and from the second original sequence by deleting other items.