## Pattern to print X in a rectangular box

Given the value of length, print the X pattern in a box using # and ” ” Examples: Input : 10 Output : ########## ##… Read More »

Given the value of length, print the X pattern in a box using # and ” ” Examples: Input : 10 Output : ########## ##… Read More »

Given a number n, find the n-th term in the series 3, 13, 42, 108, 235… Examples: Input : 3 Output : 42 Input :… Read More »

Given n and b, where n is the number of terms in the series and b is the value of the angle in degree. Program… Read More »

Given a matrix and a scalar element k, our task is to find out the scalar product of that matrix. Examples: Input : mat[][] =… Read More »

Given an array of numbers, print all those elements that are greater than average. Examples: Input : 5, 4, 6, 9, 10 Output : 9… Read More »

Following are common definition of Binomial Coefficients. A binomial coefficient C(n, k) can be defined as the coefficient of X^k in the expansion of (1… Read More »

Given a number n, find sum of digits on n when represented in different bases from 2 to n-1. Examples: Input : 5 Output :… Read More »

Given a String str , the task is to check if the sum of ASCII value of all characters is a Prime Number or not.… Read More »

We are given a string, we need check whether the first and last characters of the string str are equal or not. Case sensitivity is… Read More »

Given a String str and the task is to check sum of ASCII value of all characters is a perfect square or not. Examples :… Read More »

Given starting and ending position and a number N. Given that we are allowed to move in only four directions as shown in the image… Read More »

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 »

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 »

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 »

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 »