how to solve this prob???

You are given an array of size N . Let’s create all the subsets of this array which contain at least 2 elements. Now, operate AND over the elements of each subset, and store the results in a new array. Your task is to find out the minimum value of this new array.
Sample Input

1 2 3
Sample Output

0
Explanation

Possible Subset : (1,2) , (1,3) , (2,3) , (1,2,3) : Minimum value from

{( 1&2 ) , ( 1&3 ) ,( 2&3 ) , ( 1&2&3 )} = Minimum value from { 0,1,2,0 } is 0.

Question from an Ongoing contest in Hacker-Rank

All the best buddy…:slight_smile:

HAPPY CODING

delete the question dude @prem_93

I dont think he can delete the question.

yes he can …

how? i have never seen that option. :frowning:

you need a demo i will close one of your question just say me which of your question shall i close then see you can delete that question of yours…

take the & of all numbers

//