Skip to content

Tag Archives: triangle

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
Given ordered coordinates of a polygon with n vertices. Find the area of the polygon. Here ordered means that the coordinates are given either in… Read More
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
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
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
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
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
Given the sides of a triangle, the task is to find the area of this triangle. Examples :  Input : a = 5, b =… Read More
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
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