## Number of ways of choosing K equal substrings of any length for every query

Given a string str and Q queries. Each query consists of an integer K. The task is to find the number of ways of choosing… Read More »

- Count the number of special permutations
- Number of ways to go from one point to another in a grid
- Calculate nCr using Pascal's Triangle
- Ways of selecting men and women from a group to make a team
- Ways to Remove Edges from a Complete Graph to make Odd Edges
- Number of ways of choosing K equal substrings of any length for every query
- Ways of dividing a group into two halves such that two elements are in different groups

Given a string str and Q queries. Each query consists of an integer K. The task is to find the number of ways of choosing… Read More »

Given the NxN grid of horizontal and vertical roads. The task is to find out the number of ways that the person can go from… Read More »

Given a complete graph with N vertices, the task is to count the number of ways to remove edges such that the resulting graph has… Read More »

A useful application of Pascal’s triangle is the calculation of combinations. The formula to find nCr is n! / r! * (n – r)! which… Read More »

Given two positive integers n and k, the task is to count the number of special permutations. A special permutation P is defined as a… Read More »

Given four integers n, w, m and k where, m is the total number of men. w is the total number of women. n is… Read More »

Given 2n girls and randomly divided into two subgroups each containing n girls. The task is to count the number of ways in which groups… Read More »

Given the value of sin(Θ) and a variable n<=15. The task is to find the value of sin(nΘ) using propety of trignometric functions. Examples: Input:… Read More »

Given a value of tan(Θ) and a variable n <=15. The task is to find the value of tan(nΘ) using property of trignometric functions. Examples:… Read More »

Given a value of cos(Θ) and a variable . The task is to find the value of cos(nΘ) using propety of trignomertric functions. Note: n… Read More »

Given n eggs and k floors, find the minimum number of trials needed in worst case to find the floor below which all floors are… Read More »

Given Q queries and P where P is a prime number, each query has two numbers N and R and the task is to calculate… Read More »

The beta(), betaf() and betal() are built-in functions in C++ STL that are used to compute the beta functionof two positive real values. The function… Read More »

Given a positive ineteger n. The task is to find the sum of product of consecutive binomial coefficient i.e nC0*nC1 + nC1*nC2 + ….. +… Read More »

Given a positive integer n. The task is to find the sum of the product of r and rth Binomial Coefficient. In other words find:… Read More »