Tetrahedral Numbers

A number is termed as a tetrahedral number if it can be represented as a pyramid with a triangular base and three sides, called a… Read More »

Remove consecutive vowels from string

Given a string s of lowercase letters, we need to remove consecutive vowels from the string Note : Sentence should not contain two consecutive vowels… Read More »

Shift matrix elements row-wise by k

Given a square matrix mat[][] and a number k. The task is to shift first k elements of each row in the right of the… Read More »

Sum of series M/1 + (M+P)/2 + (M+2*P)/4 + (M+3*P)/8……up to infinite

Find the sum of series M/1 + (M+P)/2 + (M+2*P)/4 + (M+3*P)/8……up to infinite where M and P are positive integers. Examples: Input : M… Read More »

Reach A and B by multiplying them with K and K^2 at every step

We are given two numbers A and B, we need to write a program to determine if A and B can be reached starting from… Read More »

N-th number which is both a square and a cube

Given a number n, find the n-th number which is both a square and a cube. First few such numbers are 1, 64, 729, …… Read More »

Reverse Diagonal elements of matrix

Given a square matrix of order n*n, we have to reverse the elements of both diagonals. Examples: Input : {1, 2, 3, 4, 5, 6,… Read More »

Almost Perfect Number

Given a number n, check it is the Almost Perfect number or not. Almost perfect number is a natural number whose sum of all divisors… Read More »

Number of digits in 2 raised to power n

Let n be any power raised to base 2 i.e 2n. We are given the number n and our task is to find out the… Read More »

Minimum removals to make array sum even

Given an array Arr[] of N integers. We need to write a program to find minimum number of elements needed to be removed from the… Read More »

Coordinates of rectangle with given points lie inside

Given two arrays X[] and Y[] with n-elements, where (Xi, Yi) represent a point on coordinate system, find the smallest rectangle such that all points… Read More »

Total area of two overlapping rectangles

Given two overlapping rectangles on a plane. We are given bottom left and top right points of the two rectangles. We need to find the… Read More »

Program to calculate area of Circumcircle of an Equilateral Triangle

Given the length of sides of an equilateral triangle. We need to write a program to find the area of Circumcircle of the given equilateral… Read More »

Print with your own font using Python !!

Given user input, this Python3 program will print the input in designed font. In this article, we will do some cool Python trick. For the… Read More »

Program to wish Women’s Day

This article demonstrates the pattern to print the Venus Symbol (International gender symbol for females). C++ filter_none edit close play_arrow link brightness_4 code // C++… Read More »