Given side of a square n and two points (x1, y1) and (x2, y2) on the boundaries of the given square. The task is to… Read More

# Category Archives: C++ Programs

Given a pointer to the head of a singly linked list and an integer k. The task is to find the product of the first… Read More

Given a string in the form of an equation i.e A + B + C – D = E where A, B, C, D and… Read More

Given 9 elements in a 3 x 3 matrix where the value of diagonals are 0. We need to find the values in diagonal to… Read More

Given a root node to a tree, find the sum of all the leaf nodes which are at maximum depth from root node.Example: 1 /… Read More

Given here are two positive numbers a and b. The task is to print the least common multiple of a’th and b’th Fibonacci Numbers.The first… Read More

Given an array arr[] of N integers, the task is to find an element x from the array such that |arr[0] – x| + |arr[1]… Read More

Given string str, the task is to count all the sub-strings of str which are palindromes and their length is prime. Examples: Attention reader! Don’t stop… Read More

We use Exception Handling to overcome exceptions occurred in execution of a program in a systematic manner. Dividing a number by Zero is a mathematical… Read More

Given here is a frustum of height h, top-radius r & base-radius R, which inscribes a right circular cylinder which in turn inscribes a sphere… Read More

In normal median, we find a point that has minimum sum of distances. Similar concept applies in 2-D space. Given N points in 2-D space, the… Read More

Given N vertex where N is even. Initially there is no edge between any of the vertices. You are allowed to perform operation as illustrated here: … Read More

Given a N x M matrix which represents the number of rows and number of columns respectively. Each cell of a matrix is occupied by… Read More

Given an integer N, the task is to generate N non-repeating random numbers. Examples: Want to learn from the best curated videos and practice problems, check… Read More

Given an integer K and a matrix of N rows and M columns, the task is to find the minimum number of operations required to… Read More