## Number of permutations of a string in which all the occurrences of a given character occurs together

Given a string ‘s’ and a character ‘c’, the task is to find the number of permutations of the string in which all the occurrences… Read More »

## Calculate Stirling numbers which represents the number of ways to arrange r objects around n different circles

S(r, n), represents the number of ways that we can arrange r objects around indistinguishable circles of length n, and every circle n must have… Read More »

## Ways of dividing a group into two halves such that two elements are in different groups

Given 2n girls and randomly divided into two subgroups each containing n girls. The task is to count the number of ways in which groups… Read More »

## Seating arrangement of n boys and girls alternatively around a round table

There are n boys and n girls are to be seated around a round table, in a circle. The task is to find number of… Read More »

## Count ordered pairs of positive numbers such that their sum is S and XOR is K

Given a sum and a number . The task is to count all possible ordered pairs (a, b) of positive numbers such that the two… Read More »

## Count Numbers with N digits which consists of odd number of 0’s

We are given a number N. The task is to find the count of numbers which have N digits and odd number of zeroes. Note:… Read More »

## Program to calculate the value of nCr Efficiently

Given two numbers n, r ( n>=r ). The task is to find the value of C(n, r) for big value of n. Examples: Input:… Read More »

## Number of unique permutations starting with 1 of a Binary String

Given a binary string composed of 0’s and 1’s. The task is to find the number of unique permutation of the string which starts with… Read More »

## Find sum of product of number in given series

Given two numbers N and T where, and . The task is to find the value of . Since sum can be large, output it… Read More »

## Minimum length of string having all permutation of given string.

Given a string where, . Assume that all the characters in are unique. The task is to compute the minimum length of a string which… Read More »

## Walmart Labs Interview Experience ( On Campus FT + 6 month Internship )

Round 1 (Online Coding and MCQs):- The test was held on HackerEarth and was of 90 minutes. It consisted of 3 Coding Problem (100 Marks)… Read More »

## Samsung Semiconductor Institute of Research(SSIR Software) Intern/FTE | Set-2

There are N Balloons marked with value Bi (where B(i…N)). User will be given Gun with N Bullets and user must shot N times. When… Read More »

## Count strings with consonants and vowels at alternate position

Given a string str. The task is to find all possible number of strings that can be obtained by replacing the “\$” with alphabets in… Read More »

## Count number of triplets with product equal to given number with duplicates allowed

Given an array of positive integers (may contain duplicates), the task is to find the number of triplets whose product is equal to a given… Read More »

## Count ways to distribute m items among n people

Given m and n representing number of mangoes and number of people respectively. Task is to calculate number of ways to distribute m mangoes among… Read More »