AlgoMaster Logo

Bitwise AND of Numbers Range

left=5,right=7
0 / 8
algomaster.io
Step:AND every number from 5 to 7: the differing low bits get wiped out, only the shared prefix survives