## Find all sides of a right angled triangle from given hypotenuse and area | Set 1

Given hypotenuse and area of a right angle triangle, get its base and height and if any triangle with given hypotenuse and area is not… Read More »

## Maximum height when coins are arranged in a triangle

We have N coins which need to arrange in form of a triangle, i.e. first row will have 1 coin, second row will have 2… Read More »

## Program to find the Type of Triangle from the given Coordinates

We are given coordinates of a triangle. The task is to classify this triangle on the basis of sides and angle. Examples: Input: p1 =… Read More »

## Finding the number of triangles amongst horizontal and vertical line segments

Prerequisites: BIT Given ‘n’ line segments, each of them is either horizontal or vertical, find the maximum number of triangles(including triangles with zero area) that… Read More »

## Counting Triangles in a Rectangular space using BIT

Pre-requisite : BIT(Binary Indexed Tree or Fenwick Tree), 2D BIT Given a 2D plane, respond to Q queries, each of the following type: Insert x… Read More »

## Count number of unique Triangles using STL | Set 1 (Using set)

We are given n triangles along with length of their three sides as a,b,c. Now we need to count number of unique triangles out of… Read More »

## Area of a polygon with given n ordered vertices

Given ordered coordinates of a polygon with n vertices. Find area of the polygon. Here ordered mean that the coordinates are given either in clockwise… Read More »

## Triangular Numbers

A number is termed as triangular number if we can represent it in the form of triangular grid of points such that the points form… Read More »

## Number of Triangles in Directed and Undirected Graphs

Given a Graph, count number of triangles in it. The graph is can be directed or undirected. Example: Input: digraph[V][V] = { {0, 0, 1,… Read More »

## Count Integral points inside a Triangle

Given three non-collinear integral points in XY plane, find the number of integral points inside the triangle formed by the three points. (A point in… Read More »

## Number of Triangles in an Undirected Graph

Given an Undirected simple graph, We need to find how many triangles it can have. For example below graph have 2 triangles in it. Let… Read More »

## Program to print Sum Triangle for a given array

Given a array, write a program to construct a triangle where last row contains elements of given array, every element of second last row contains… Read More »

## Program to find area of a triangle

Finding area using given sides: Examples : Input : a = 5, b = 7, c = 8 Output : Area of a triangle is… Read More »

## Count the number of possible triangles

Given an unsorted array of positive integers. Find the number of triangles that can be formed with three different array elements as three sides of… Read More »

## Check whether a given point lies inside a triangle or not

Given three corner points of a triangle, and one more point P. Write a function to check whether P lies within the triangle or not.… Read More »