Prateek Jangid has Published 165 Articles

Find the Number of Sink Nodes in a Graph using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 12:04:19

340 Views

In this article, we will describe the important information on solving the number of sinks nodes in a graph. We have a Directed Acyclic Graph with N nodes (1 to N) and M edges in this problem. The goal is to find how many sink nodes are there in the ... Read More

Find the Number of Siblings of a Given Node in N-ary Tree using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 12:02:24

274 Views

In this article, we will provide complete information to determine the number of siblings of a given node in the n-ary tree. We need to find the node's siblings with the value of key as given by the user; if it is non, then output as -1. There is only ... Read More

Find the Number of segments where all elements are greater than X using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 11:34:22

345 Views

In this article, we have to find the number of segments or subarrays in a given sequence where elements greater than the given number X.We can count overlapping segments only once, and two contiguous elements or segments should not count separately. So here is the basic example of the given ... Read More

Find the Number of Reflexive Relations on a Set using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 11:20:05

565 Views

In this article, we will explain the approaches to find the number of reflexive relations on a set. In this problem, we are given with number n, and on a set of n natural numbers, we must determine the number of reflexive relations.Reflexive Relation − A relation in a set ... Read More

Find the Number of quadruples where the first three terms are in AP and last three terms are in GP using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 11:16:28

158 Views

In this article, we will describe every possible approach to find the number of quadruples in which the first 3 terms are in A.P., and the last 3 are in G.P. First, we will explain the basic definition of arithmetic progression(A.P.) and geometric progression (G.P.).Arithmetic progression(A.P.) − It is a ... Read More

Find the Number of Quadrilaterals Possible from the Given Points using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 11:12:38

507 Views

A quadrilateral forms a polygon with four vertices and four edges in Euclidean plane geometry. The name 4-gon etc. Included in other names of quadrilaterals and sometimes they are also known as a square, display style, etc.In this article, we will explain the approaches to finding the number of quadrilaterals ... Read More

Find the Number of Primes In A Subarray using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 11:08:25

285 Views

In this article we will describe the ways to find the number of primes in a subarray. We have an array of positive numbers arr[] and q queries having two integers that denote our range {l, R} we need to find the number of primes in the given range. So ... Read More

Find the Number of Prime Pairs in an Array using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 11:03:12

358 Views

In this article, we will explain everything about finding the number of prime pairs in an array using C++. We have an array arr[] of integers, and we need to find all the possible prime pairs present in it. So here is the example for the problem −Input : arr[ ... Read More

Find the Number of Prefix Sum Prime in Given Range Query using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 08:03:58

303 Views

In this article, we need to find a number of prefix sum which are prime numbers in a given array arr[ ] of positive integers and range query L, R, where L is the initial index value arr[ L ] for prefixsum[ ] array and R is the number of ... Read More

Find the Number of Possible Pairs of Hypotenuse and Area to Form Right Angled Triangle using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 07:57:31

269 Views

In this article, we will explain how to solve the number of possible pairs of hypotenuse and area form a right-angled triangle in C++.We need to determine the number of all possible pairs of a hypotenuse and the area ( H, A ) to form a right-angled triangle with H ... Read More

Advertisements