# Category Archives: C++ Programs

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:   Input: N = 5 Output: 1 5 2 4 3 Input: N… 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
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
Given an NxN matrix and an integer X. The task is to remove X rows and X columns from the NxN matrix. Remove the first… Read More
What is Extrapolation? Extrapolation is the process in mathematics where the required value is estimated beyond the range the of the given variable range. Extrapolation is… Read More
Given an integer N and a pizza which can be cut into pieces, each cut should be a straight line going from the center of… Read More
Given a cube of side length a, which inscribes a sphere which in turn inscribes a right circular cone. The task is to find the… Read More
Given an integer K and a numeric string str (all the characters are from the range [‘0’, ‘9’]). The task is to count the number… Read More
Given a regular hexagon of side length a which inscribes a square which in turn inscribes a reuleaux triangle. The task is to find the… Read More
Given a complete binary tree, traverse it such that all the boundary nodes are visited in Anti-Clockwise order starting from the root.Example:   Input: 18 /… Read More
Given an integer X and a square matrix mat[][], the task is to remove the first X rows and columns from the given matrix and… Read More
Given a Character matrix as input, the task is to check whether all the enemies are killed or not based on below conditions:  1. The… Read More