Tester: Rahul Kumar

Setter: Aniket Kumar

Editorialist: Aniket Kumar

**DIFFICULTY:**

SIMPLE

**PROBLEM:**

Given an integer N and an array A of N integers. Find a non-empty subarray whose bitwise AND of all elements is minimum possible.

A subarray can be formed after deleting some or none elements from front and back.

Print the minimum bitwise & of subarray.

**EXPLANATION:**

doing AND always reduces the value or value remains same

using this observation we can take the bitwise AND of all the numbers present and that will the minimum possible value.

**TIME COMPLEXITY:**

O(N)

**SOLUTION:**

https://www.codechef.com/viewsolution/51362534

Please comment below if you have any questions, alternate solutions, or suggestions.