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…

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                    …