1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Update (1)斐波那契数列问题和跳台阶问题.md

This commit is contained in:
Snailclimb 2018-07-08 11:08:49 +08:00 committed by GitHub
parent 0f90a2b9ee
commit 651731b209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,9 +115,10 @@ f(n)=f(n-1)+f(n-2)+...+f(1)
```
#### **补充:**
**java中有三种移位运算符**
1. << : **左移运算符**等同于乘2的n次方
2. >>: **右移运算符**等同于除2的n次方
3. >>> **无符号右移运算符**不管移动前最高位是0还是1右移后左侧产生的空位部分都以0来填充。与>>类似。
1. “<<” : **左移运算符**等同于乘2的n次方
2. “>>”: **右移运算符**等同于除2的n次方
3. “>>>” **无符号右移运算符**不管移动前最高位是0还是1右移后左侧产生的空位部分都以0来填充。与>>类似。
例:
int a = 16;
int b = a << 2;//左移2等同于16 * 2的2次方也就是16 * 4