you give 0indexed array num length n consist nonnegative integer for index 0 n 1 determine size minimum sized nonempty subarray num start inclusive maximum possible bitwise ORIn word let Bij bitwise or subarray numsij you need find small subarray start bitwise or subarray equal maxbik k n 1the bitwise or array bitwise or number itreturn integer array answer size n answeri length minimum size subarray start maximum bitwise ORA subarray contiguous nonempty sequence element array example 1input num 10213output 33221explanationthe maximum possible bitwise OR start index 3 start index 0 short subarray yield 102 start index 1 short subarray yield maximum bitwise or 021 start index 2 short subarray yield maximum bitwise or 21 Starting index 3 short subarray yield maximum bitwise or 13 Starting index 4 short subarray yield maximum bitwise or 3therefore return 33221 Example 2input num 12Output 21ExplanationStarting index 0 short subarray yield maximum bitwise or length 2starte index 1 short subarray yield maximum bitwise or length 1therefore return 21 Constraintsn numslength1 n 1050 numsi 109