## Ways to paint N paintings such that adjacent paintings don’t have same colors

Given two integers n and m, where n represent some paintings numbered from 1 to n and m represent some colours 1 to m with… Read More »

- Samsung Semiconductor Institute of Research(SSIR Software) Intern/FTE | Set-2
- Walmart Labs Interview Experience ( On Campus FT + 6 month Internship )
- Count number of triplets with product equal to given number with duplicates allowed | Set-2
- Count number of triplets with product equal to given number with duplicates allowed
- Number of ways to reach Nth floor by taking at-most K leaps
- Program to calculate the value of nCr Efficiently
- Count of Numbers in Range where first digit is equal to last digit of the number
- Generating Lyndon words of length n
- Count unique subsequences of length K
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Count ways to distribute m items among n people
- Count the number of special permutations
- Number of handshakes such that a person shakes hands only once
- Count Numbers with N digits which consists of odd number of 0's
- Dilworth's Theorem
- Count of Numbers in Range where the number does not contain more than K non zero digits
- Number of triangles that can be formed with given N points
- Count unordered pairs (i,j) such that product of a[i] and a[j] is power of two
- Count of Numbers in a Range where digit d occurs exactly K times
- Ways to paint N paintings such that adjacent paintings don't have same colors
- Total number of subsets in which the product of the elements is even
- Minimum and Maximum number of pairs in m teams of n people
- Minimum numbers needed to express every integer below N as a sum
- Number of moves required to guess a permutation.
- Count sub-sets that satisfy the given condition
- Count ordered pairs of positive numbers such that their sum is S and XOR is K
- Permutations of string such that no two vowels are adjacent
- Ways to form n/2 pairs such that difference of pairs is minimum
- Count strings with consonants and vowels at alternate position
- Count numbers whose difference with N is equal to XOR with N

Given two integers n and m, where n represent some paintings numbered from 1 to n and m represent some colours 1 to m with… Read More »

Given an integer k and a string str consisting of lowercase English alphabets, the task is to count how many k character words (with or… Read More »

Given two integers N1 and N2 where, N1 is the number of people in group 1 and N2 is the number of people in group… Read More »

Given a number N denotes the total number of elements in a matrix, the task is to print all possible order of matrix. An order… Read More »

Given a string with duplicate characters allowed, print first n permutations of given string such that no permutation is repeated. Examples: Input : string =… Read More »

Given a string str consisting only of lowercase English alphabets, the task is to count the number of ways to remove exactly one sub-string from… Read More »

Given a range represented by two positive integers l and r and two integers d and m. Find the count of numbers lying in the… Read More »

Given a string consisting of vowels and consonants. The task is to find the number of ways in which the characters of the string can… Read More »

Given a range represented by two positive integers L and R and a positive integer K. Find the count of numbers in the range where… Read More »

Given two positive integers L and R which represents a range and two more positive integers d and K. The task is to find the… Read More »

Given a string str which contains only the characters x and y, the task is to count all the sub-strings that start and end with… Read More »

Given a range represented by two positive integers L and R. Find the count of numbers in the range where the first digit is equal… Read More »

Given an array arr[], the task is to find the count of pairs from the array such that LCM(arr[i], arr[j]) > min(arr[i], arr[j]) Note: Pairs… Read More »

Given an array arr[] and an integer x, the task is to count the number of sub-sets of arr[] sum of all of whose sub-sets… Read More »

Given two positive integers n and k, the task is to count the number of special permutations. A special permutation P is defined as a… Read More »