## Validation of Equation Given as String

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

## Filling diagonal to make the sum of every row, column and diagonal equal of 3×3 matrix

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 »

## Sum of nodes at maximum depth of a Binary Tree | Set 2

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 »

## Program to find LCM of two Fibonnaci Numbers

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… Read More »

## Array element with minimum sum of absolute differences

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

## Count all Prime Length Palindromic Substrings

Given a string str, the task is to count all the sub-strings of str which are palindromes and their length is prime. Examples: Input: str… Read More »

## Handling the Divide by Zero Exception in C++

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 »

## Largest sphere that can be inscribed in a right circular cylinder inscribed in a frustum

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 »

## Geometric Median

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,… Read More »

## Minimum operations of the given type required to make a complete graph

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… Read More »

## Check if possible to shuffle a matrix with adjacent movements

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 »

## Generate a random permutation of 1 to N

Given an integer N, the task is to generate N non repeating random numbers. Examples: Input: N = 5 Output: 1 5 2 4 3… Read More »

## Minimum operations of given type to make all elements of a matrix equal

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 »

## Biggest Reuleaux Triangle inscribed within a square which is inscribed within an ellipse

Given an ellipse with major axis length and minor axis 2a & 2b respectively which inscribes a square which in turn inscribes a reuleaux triangle.… Read More »

## Remove any corner X rows and columns from a matrix

Given a NxN matrix and an integer X. The task is to remove X rows and X columns from the NxN matrix. Remove first X… Read More »