Close

## Minimum AND of all subsets

This problem is from a recent contest on Hackerrank. If you want to solve this problem on your own, Click on this link.Here is the problem statement:Given array of size N, we have to find all the subsets of size > 2 of this array. Apply AND (bitwise &) on all the subsets. Print the…

## Stamps problem – SPOJ

This problem is from SPOJ. Give it a try by following this link! The simplified problem statement is as follows.  You need to collect some stamps from friends. Suppose you have n friends and each of them have some stamps with them {s1, s2, … sn}.   The problem is to find if we can…

## Boys and Girls – SPOJ problem

This problem is from SPOJ. Please follow this link if you want to try on your own! The problem is as follows. Given some number of boys and girls, we have to arrange them in a row such that the same gender appear together is minimized.  We have to find the minimum number of any…

## Birthday candles – Codechef problem

This is from CodeChef practice problems. Follow this link to try on your own! Here is the simplified problem statement. A number of candles are given each of them labelled with the digit 0-9. We have to find the minimum positive number that can not be formed with the given candles.  The input is given…

## Continuous sequence

This problem is from codeforces. If you want to solve this problem on your own. Please head over here and solve it!The simplified problem statement is as follows.Given a sequence of 0 and 1s. Check if contains a continuous sequence of 0/1 of length 7.For example see some input output combinations Input                             Output—————————————— 10001010010011                    NO1000000001100                    …