Prateek Jangid has Published 190 Articles

Find the number of subarrays have bitwise OR >= K using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 12:26:43

615 Views

In this article, we will provide a brief explanation on solving the number of subarrays that have bitwise OR>=K in C++. So we have an array arr[] and an integer K, and we have to find the number of subarrays that have OR(bitwise or) greater than or equal to K. ... Read More

Find the Number of Stopping Stations using C++

Prateek Jangid

Prateek Jangid

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

121 Views

There are n number of intermediate train stations between point X and Y. Count the number of different ways trains can be arranged to stop at s stations such that no two stations are next to each other. So in this article, we will explain every possible approach to find ... Read More

Find the Number of Solution to Modular Equations using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 12:13:08

154 Views

In this article we will explain everything about what is the solution of modular equations, also we will write a program to find a number of solutions to modular equations. So here is the basic example −Input : X = 30 Y = 2 Output : 4, 7, 14, 28 ... Read More

Find the Number of Solutions of n = x + n x using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 12:09:50

154 Views

In this article we are going to find number of solution of equation n = x + n ⊕ x, i.e we need to find number of values of x possible with given value n such that n = x + n ⊕ x where ⊕ represents XOR operation.Now we ... Read More

Find the Number of solutions for the equation x + y + z <= n using C++

Prateek Jangid

Prateek Jangid

Updated on 24-Nov-2021 12:06:35

205 Views

In this article, we will explain the approaches to find the number of solutions for the equation x+y+z

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

Prateek Jangid

Prateek Jangid

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

187 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

134 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

216 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

380 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

81 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

Advertisements