how did it happen,2^i-1 to (1<<i)-1.
please explain
About bitwise operator
hi @mkjha << is the left shift operator, it shifts the bits of the number i places to the left.
so initially we have (assuming we have an 8-bit number)
00000001 -> 2^0 = 1
76543210
Now, lets say i = 3, and we shift all the digits to the left by i places
00001000 -> 2^3 = 8
76543210
are you getting it now?