## Number of unique permutations starting with 1 of a Binary String

Given a binary string composed of 0’s and 1’s. The task is to find the number of unique permutation of the string which starts with… Read More »

## Find nth term of a given recurrence relation

Let an be a sequence of numbers, which is defined by the recurrence relation a1=1 and an+1/an=2n. The task is to to find the value… Read More »

## Program to Find the value of cos(nΘ)

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 »

## Program to find total number of edges in a Complete Graph

Given N number of vertices of a Graph. The task is to find the total number of edges possible in a complete graph of N… Read More »

## Maximum Possible Edge Disjoint Spanning Tree From a Complete Graph

Give a complete graph with N-vertices. The task is to find out the maximum number of edge-disjoint spanning tree possible. Edge-disjoint Spanning Tree is a… Read More »

## Minimum length of the shortest path of a triangle

Given N points on the plane, ( X1, Y1 ), ( X2, Y2 ), ( X3, Y3 ), ……, ( XN, YN ). The task… Read More »

## Maximum number of pieces in N cuts

Given a square piece and a total number of cuts available n, Find out the maximum number of rectangular or square pieces of equal size… Read More »

## Program to find Length of Bridge using Speed and Length of Train

Given the Length and Speed of the train and the time takes by the train to passes the bridge or tunnel, the task is to… Read More »

## Permutations to arrange N persons around a circular table

Given N, the number of persons. The task is to arrange N person around a circular table. Examples: Input: N = 4 Output: 6 Input:… Read More »

## Check if it is possible to create a polygon with a given angle

Given an angle where, . The task is to check whether it is possible to make a regular polygon with all of its interior angle… Read More »

## Program to find sum of the given sequence

Given two numbers and . The task is to find the sum of the sequence given below. (1*2*3*…*k) + (2*3*…*k*(k+1)) + (3*4*..*(k+1)*(k+2)) +…..+((n-k+1)*(n-k+2)*…*(n-k+k)). Since the… Read More »

## Find Nth term of the series 5, 13, 25, 41, 61…

Given a number N. The task is to write a program to find the Nth term in the below series: 5, 13, 25, 41, 61…… Read More »

## Modulo power for large numbers represented as strings

Given two numbers sa and sb represented as strings, find ab % MOD where MOD is 1e9 + 7. The numbers a and b can… Read More »

## Find First element in AP which is multiple of given prime

Given the first term (A) and common difference (D) of an Arithmetic Progression, and a prime number (P). The task is to find the position… Read More »

## Maximum possible intersection by moving centers of line segments

Given three points on the X-axis which denotes the center of three line segments. The length of the line segment is also given as L.… Read More »