## Find Maximum and Minimum element in a Set in C++ STL

Given a Set, the task is to find the maximum and minimum element of this set in C++ STL. Examples: Input: set={1, 6, 15, 10,… Read More »

## Greatest divisor which divides all natural number in range [L, R]

Given two integers L and R, the task is to find the greatest divisor that divides all the natural numbers in the range [L, R].… Read More »

## Find the repeating and the missing number using two equations

Given an array arr[] of size N, each integer from the range [1, N] appears exactly once except A which appears twice and B which… Read More »

## Divide the two given numbers by their common divisors

Given two numbers A and B, the task is to Divide the two numbers A and B by their common divisors. The numbers A and… Read More »

## How to delete a range of values from the Set using Iterator

Given a Set, the task is to delete a range of values from this Set using Iterator. Example: Input: set = [10 20 30 40… Read More »

## Length of Diagonal of a n-sided regular polygon

Given a n-sided regular polygon of side length a.The task is to find the length of it’s diagonal. Examples: Input: a = 9, n =… Read More »

## Occurrences of a pattern in binary representation of a number

Given a string pat and an integer N, the task is to find the number of occurrences of the pattern pat in binary representation of… Read More »

## Minimum Numbers of cells that are connected with the smallest path between 3 given cells

Given coordinates of 3 cells (X1, Y1), (X2, Y2) and (X3, Y3) of a matrix. The task is to find the minimum path which connects… Read More »

## Recursive Program for Binary to Decimal

Given a binary number as string, find its decimal equivalent. Examples: Input : binary = “101” Output : 5 Input : binary = “1111” Output… Read More »

## Area of a n-sided regular polygon with given Radius

Given a regular polygon of N sides with radius(distance from the center to any vertex) R. The task is to find the area of the… Read More »

## Area of a n-sided regular polygon with given side length

Given a regular polygon of N sides with side length a. The task is to find the area of the polygon. Examples: Input : N… Read More »

## Diagonal of a Regular Decagon

Given an integer a which is the side of a regular decagon, the task is to find and print the length of its diagonal. Examples:… Read More »

## Diagonal of a Regular Heptagon

Given an integer a which is the side of a regular heptagon, the task is to find and print the length of its diagonal. Examples:… Read More »

## Count common prime factors of two numbers

Given two integer and , the task is to find the count of common factors of two numbers where factors are prime. Examples: Input: A… Read More »

## Recursive program to insert a star between pair of identical characters

Given a string with repeated characters, we have to insert a star i.e.” * “ between pair of adjacent identical characters using recursion. Examples: Input… Read More »