What language are you using?
>> means left and right bitshift in C++. But it does have a different operator precedence, so you might need to wrap it around with parentheses or it will not work.
In most of languages, << and >> mean shifting. bitwise shift acually mean *2 and /2. You r still multiplying, in a different way.
Shifting is totally different from multiplication, they are different instructions. In most processors a shifting instruction takes just one cycle while a multiplication instruction takes tens of cycles
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.