as the question suggests we need to find OR of all the subsequence of given array
`arr = { 1,3,4,0} `
bitwise OR of all subsequence
`[0] => 0
[4] => 4
[4, 0] => 4
[3] => 3
[3, 0] => 3
[3, 4] => 7
[3, 4, 0] => 7
[1] => 1
[1, 0] => 1
[1, 4] => 5
[1, 4, 0] => 5
[1, 3] => 3
[1, 3, 0] => 3
[1, 3, 4] => 7
[1, 3, 4, 0] => 7`
so bitwise OR of all the subsequence is
`{0,1,3,4,5,7}`
exclude repeated, **smallest missing whole** no is 2
now `1<= array.length <= 10^5 and 0<= arr[i] <= 10^5`
how do you solve this with an optimized approach, not exponential complexity (without generating all the subsequnce)?
The logic is simple.
`
' #Java #StriverYoutube(Learned bit about Recursions by using your videosThanks)