Why is it faster to process a sorted array than an unsorted array?
移位运算:
java中有三种移位运算符
<< 左移 ==* 2
右移 == /2
<< : 左移运算符,num << 1,相当于num乘以2
: 右移运算符,num >> 1,相当于num除以2
: 无符号右移,忽略符号位,空位都以0补齐
参考:
http://www.cnblogs.com/hongten/p/hongten_java_yiweiyunsuangfu.html










网友评论