## Count of distinct pair sum between two 1 to N value Arrays

Given a positive integer N such that there exists two arrays a[] and b[] each containing values {1, 2, 3, .., N}, the task is… Read More »

- Product of all Subarrays of an Array
- Must do Math for Competitive Programming
- Perfect Sum Problem
- How is the time complexity of Sieve of Eratosthenes is n*log(log(n))?
- Pi(π) in C++ with Examples
- Check whether a number can be represented as difference of two squares
- Modulo Operator (%) in C/C++ with Examples
- Count of subsets with sum equal to X using Recursion
- Maximum number of unique values in the array after performing given operations
- Count of subarrays having exactly K perfect square numbers
- Sum of GCD of all possible sequences
- Find the numbers from 1 to N that contains exactly k non-zero digits
- Logarithm tricks for Competitive Programming
- Program to calculate Electricity Bill
- Longest sub-array with maximum GCD
- Count of subarrays which start and end with the same element
- Puzzle | Dividing a Square into N smaller squares
- Minimize the maximum difference of adjacent elements after at most K insertions
- Maximum GCD of all subarrays of length at least 2
- Find K distinct positive odd integers with sum N
- Maximum profit by buying and selling a share at most K times | Greedy Approach
- Longest Mountain Subarray
- Expected Number of Trials to get N Consecutive Heads
- Digital Root of a given large integer using Recursion
- Count number of pairs with positive sum in an array
- Program to calculate Percentile of a student based on rank
- Find the minimum number to be added to N to make it a prime number
- Probability of getting K heads in N coin tosses
- Minimum window size containing atleast P primes in every window of given range
- Find the count of mountains in a given Matrix

Given a positive integer N such that there exists two arrays a[] and b[] each containing values {1, 2, 3, .., N}, the task is… Read More »

Given an integer N, check whether the given number is a Moran Number or not. Moran numbers are a subset of Harshad numbers. A number… Read More »

Given an integer N, the task is to check if N is a Hendecagonal Number or not. If the number N is an Hendecagonal Number… Read More »

Given an integer N, the task is to check if N is a Tetradecagonal Number or not. If the number N is an Tetradecagonal Number… Read More »

Given an integer N, the task is to check if N is a Hexadecagonal Number or not. If the number N is an Hexadecagonal Number… Read More »

Given a number N, the task is to check if N is a Nonagonal Number or not. If the number N is an Nonagonal Number… Read More »

Given a number N, the task is to check if N is a Enneadecagonal Number or not. If the number N is an Enneadecagonal Number… Read More »

Given an array arr[] and an integer K, the task is to find number of non empty subsequence of length K from the given array… Read More »

Given an integer N, the task is to count of decreasing pairs from numbers 1 to N. A pair (x, y) is said to be… Read More »

Given an array of integers arr, the task is to calculate the number of pairs (i, j) where i < j such that arr[j] %… Read More »

Given a number N, the task is to find Nth Icositrigonal number or not. An Icositrigonal number is class of figurate number. It has 23… Read More »

Given a number N, the task is to find the sum of first N Icosagonal Numbers. The first few Icosagonal numbers are 1, 20, 57,… Read More »

Given a number N, the task is to find the Nth Icositetragonal number. An Icositetragonal number is a class of figurate number. It has a… Read More »

Given a number N, the task is to find the sum of first N Centered Pentagonal Numbers. The first few Centered Pentagonal Number are 1,… Read More »

Given a number N, the task is to find the sum of first N Centered tridecagonal number. A Centered tridecagonal number represents a dot at… Read More »