Count of all possible ways to reach a target by a Knight
Given two integers N, M denoting N×M chessboard, the task is to count the number of ways a knight can reach (N, M) starting from… Read More »
Given two integers N, M denoting N×M chessboard, the task is to count the number of ways a knight can reach (N, M) starting from… Read More »
Given two numbers N1 and N2 represented by two stacks, such that their most significant digits are present at the bottom of the stack, the… Read More »
Given two strings str1 and str2, the task is to find the lexicographic smallest permutation of str1 that contains str2 as a substring.Note: Assume that… Read More »
Given a binary string of length N, we need to find out how many sub-strings of this string contains only 1s. Examples: Input: S =… Read More »
Given an integer N, the task is to find the product of proper divisors of the number modulo 109 + 7 for Q queries. Examples:… Read More »
Given a number N, the task is to find the largest power of 2 that divides LCM of first N Natural numbers. Examples: Input: N… Read More »
Given an integer N, the task is to check if it is possible to make N prime by deleting any single digit from N. Examples:… Read More »
Given an integer N, the task is to check if N has an odd number of odd divisors and even number of even divisors. Examples:… Read More »
Given a string S, the task is to count the distinct permutations of every possible length of the given string. Note: Repetition of characters is… Read More »
Given two integers A and X, denoting the length of a side of a rhombus and an angle respectively, the task is to find the… Read More »
Given a string str and a positive integer N, the task is to reverse N characters and skip N characters until the end of the… Read More »
The Google online challenge 2020 for summer internships 2021 was held on August 16. It was a 60-minute online test having 2 questions to code.… Read More »
You are working in Samara, Russia for a few days. Each day has a new pay per unit of work and a new cost per… Read More »
Given an array arr[], consisting of N positive integers in the range [1, N], the task is to find the largest minimum distance between any… Read More »
Given a binary array arr[] consisting of N integers, the task is to calculate the minimum number of operations of the following type needed to… Read More »