## Distinct Prime Factors of Array Product

Given an array of integers.Let us say P is the product of elements of the array. Find the number of of distinct prime factors of… Read More »

Given an array of integers.Let us say P is the product of elements of the array. Find the number of of distinct prime factors of… Read More »

Coding questions in this article are difficulty wise ordered. The idea of this post is to target two types of people. Competitive Programming Preparation (For… Read More »

Given two numbers sa and sb represented as strings, find ab % MOD where MOD is 1e9 + 7. The numbers a and b can… Read More »

Given two binary strings s1 and s2. The XOR of them is X, the task is to find the number of ways to swap two-bit… Read More »

Given four points (x, y) in the cartesian coordinate. Find the possible no of quadrilaterals than can be formed by joining all the four points.… Read More »

Competitive Programming is considered as a sport in the field of computer science. The culture of this sport is growing day by day and a… Read More »

In 2017, when ACM allowed Python support for its prestigious competition, the ACM ICPC, a whole new community became interested in the sport of competitive… Read More »

Given an integer N, the task is to find an aggregate sum of all integer partitions of this number such that each partition does not… Read More »

There is a hierarchical structure in an organization. A party is to be organized. No two immediate subordinates can come to the party. A profit… Read More »

Shortcode is ideal in competitive programming because programs should be written as fast as possible. Because of this, competitive programmers often define shorter names for… Read More »

Measuring frequency of elements in an array is a really handy skill and is required a lot of competitive coding problems. We, in lot of problems… Read More »

Given Q queries and an empty list. The queries can be of two types: addToList(x) : Add x to your list. removeFromList(x) : Remove x… Read More »

Given a, b and c which are part of the equation x = b * ( sumdigits(x) ^ a ) + c. Where sumdigits(x) determines… Read More »

Given an undirected weighted graph. The task is to find the minimum cost of the path from source node to the destination node via an… Read More »

Given a perimeter P, the task is to find the number of right triangles possible with perimeter equal to p. Examples: Input: P = 12… Read More »