# Tag Archives: Geometric-Lines

## Find the point on X-axis from given N points having least Sum of Distances from all other points

Given an array arr[] consisting of N integers, denoting N points lying on the X-axis, the task is to find the point which has the… Read More »

## Missing vertex among N axis-parallel rectangles

Given N axis-parallel rectangles in a 2-D cartesian coordinate system and coordinates of 4N-1 vertices, the task is to find the single vertex missing.Examples: Input:… Read More »

## Count of intersections of M line segments with N vertical lines in XY plane

Given x coordinates of N vertical lines (parallel to Y-axis) and M line segments extending from (x1, y1) to (x2, y2), the task is to… Read More »

## Angle between a Pair of Lines in 3D

Given coordinates of three points A(x1, y1, z1), B(x2, y2, z2) and C(x3, y3, z3) in a 3D plane, where B is the intersection point… Read More »

## Number of ways to choose K intersecting line segments on X-axis

Given an array arr[] of line segments on the x-axis and an integer K, the task is to calculate the number of ways to choose… Read More »

## Check if the tower of sight issue occurs or not

Given four co-ordinates A, B, C and D where towers need to be constructed, the task is to check if the tower of sight issue… Read More »

## Find the maximum value of Y for a given X from given set of lines

Given a set of lines represented by a 2-dimensional array arr consisting of slope(m) and intercept(c) respectively and Q queries such that each query contains… Read More »

## Minimum distance from a point to the line segment using Vectors

Given the coordinates of two endpoints A(x1, y1), B(x2, y2) of the line segment and coordinates of a point E(x, y); the task is to… Read More »

## Find X and Y intercepts of a line passing through the given points

Given two points on a 2D plane, the task is to find the x – intercept and the y – intercept of a line passing… Read More »

## Find the original coordinates whose Manhattan distances are given

Given the Manhattan distances of three coordinates on a 2-D plane, the task is to find the original coordinates. Print any solution if multiple solutions… Read More »

## Equation of straight line passing through a given point which bisects it into two equal line segments

Given a straight line which passes through a given point (x0, y0) such that this point bisects the line segment in two equal line segments.… Read More »

## Length of the normal from origin on a straight line whose intercepts are given

Given the intercepts of a straight line on both the axes as m and n. The task is to find the length of the normal… Read More »

## Slope of the line parallel to the line with the given slope

Given an integer m which is the slope of a line, the task is to find the slope of the line which is parallel to… Read More »

## Find foot of perpendicular from a point in 2 D plane to a Line

Given a point P in 2-D plane and equation of a line, the task is to find the foot of the perpendicular from P to… Read More »

## Check whether two straight lines are orthogonal or not

Given two line segments AB and CD having A(x1, y1), B(x2, y2), C(x3, y3) and D(x4, y4). The task is to check whether these two… Read More »