Given sides of four small squares. You have to find the side of the smallest square such that it can contain all given 4 squares… Read More
Category Archives: C++ Programs
Given a matrix mat[][] containing the characters Z, P and * where Z is a zombie, P is a plant and * is a bare… Read More
Given a String of three Colours(G, B, Y) as input, the task is to print the resultant combined color formed according to the rule given… Read More
Given a Singly Linked List. The task is to check if the absolute difference between the consecutive nodes in the linked list is 1 or… Read More
Given here is a semicircle of radius r which inscribes a square which in turn inscribes a reuleaux triangle. The task is to find the… Read More
Given here is an equilateral triangle of sidelength a which inscribes a square which in turn inscribes a reuleaux triangle. The task is to find… Read More
Given a sorted array, the task is to find the floor and ceil of given numbers using STL.Examples: Input: arr[] = {1, 2, 4, 7,… Read More
Given LinkedList, replace each node’s value with its surpasser count. That is the count of elements which are greater towards its right. Examples: Input :… Read More
Given a Binary Tree. The task is to print the circular clockwise spiral order traversal of the given binary tree. For the above binary tree,… Read More
Given a Natural number N and a whole number L, the task is to find the count of numbers, smaller than or equal to N,… Read More
Given a string str and an integer X. The task is to reverse the middle X characters of the given string and then print the… Read More
Given a number N, the task is to find the largest positive integer less than or equal to N/2 which is coprime to N. Note: Two… Read More
Given a number The task is to print the multiples of the unit digit of N from the unit digit of N to N. Note: If… Read More
Given here is an equilateral triangle of side length a. The task is to find the side of the biggest square that can be inscribed… Read More
Given Mth and Nth term of a Geometric progression. Find its Pth term.Examples: Input: m = 10, n = 5, mth = 2560, nth =… Read More