## Find if nCr is divisible by the given prime

Given three integers N, R and P where P is prime, the task is to find whether NCR is divisible by P or not. Examples:… Read More »

- Java Program to print distinct permutations of a string
- Number of unique pairs in an array
- Sum of all Submatrices of a Given Matrix
- Count of Numbers in Range where first digit is equal to last digit of the number
- Count pairs of non-overlapping palindromic sub-strings of the given string
- Generate all permutations of a string that follow given constraints
- Count paths with distance equal to Manhattan distance
- Count of sub-sets of size n with total element sum divisible by 3
- Sum of bitwise AND of all submatrices
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Sum of (maximum element - minimum element) for all the subsets of an array.
- Number of ways of scoring R runs in B balls with at most W wickets
- Number of triangles that can be formed with given N points
- Sum of Bitwise-OR of all Submatrices
- Total number of subsets in which the product of the elements is even
- Python program to get all subsets of given size of a set
- Count of Numbers in a Range where digit d occurs exactly K times
- K length words that can be formed from given characters without repetition
- XOR of all the elements in the given range [L, R]
- Permutations of string such that no two vowels are adjacent
- Count of Numbers in Range where the number does not contain more than K non zero digits
- Count the number of special permutations
- Number of ways to go from one point to another in a grid
- Number of submatrices with OR value 1
- Number of submatrices with all 1s
- Ways to paint N paintings such that adjacent paintings don't have same colors
- Program to calculate the value of nPr
- Maximum sum from three arrays such that picking elements consecutively from same is not allowed
- Number of trailing zeroes in base 16 representation of N!
- Deletions of "01" or "10" in binary string to make it free from "01" or "10"

Given three integers N, R and P where P is prime, the task is to find whether NCR is divisible by P or not. Examples:… Read More »

Given an N * N matrix arr[][] consisting of non-negative integers, the task is to find the number of ways to reach arr[N – 1][N… Read More »

Given a string, generate all permutations of it that do not contain ‘B’ after ‘A’, i.e., the string should not contain “AB” as a substring.… Read More »

Given three integers N, E and O. The task is to find an array of size N such that the number of sub-arrays of sum… Read More »

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More »

Given two integers K and N, the task is to count the number of ways to arrange K different objects taking N objects at a… Read More »

Given an array A[] containing N elements and an integer K. The task is to calculate the product of all elements of subsequences of size… Read More »

Given an integer array arr[] of length N and an integer K, the task is to count the number of possible arrays of length K… Read More »

Given an array arr[] which contains the frequency of the digits (0-9), the task is to find the count of numbers possible using each digit… Read More »

Given an array arr[] of N integers. The task is to count the number of sub-sequences whose sum is 0. Examples: Input: arr[] = {-1,… Read More »

Given a 3-digit number N, the task is to find if N is an Osiris number or not. Osiris numbers are the numbers that are… Read More »

Given an integer n, the task is to check if n is a Dudeney number or not. A Dudeney number is a positive integer that… Read More »

Given an integer N, the task is to check if N is a Dihedral prime number or not. A Dihedral prime is a prime number… Read More »

Given an array of N integers where arr[i] denotes the number of sticks of length 2i. The task is to find the number of triangles… Read More »

Given a string S. The task is to count the non-overlapping pairs of palindromic sub-strings S1 and S2 such that the strings should be S1[L1…R1]… Read More »