mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-25 02:27:10 +08:00
fix typo
This commit is contained in:
parent
0c61be453d
commit
4a255c9aa3
@ -35,7 +35,6 @@ n<=39
|
||||
|
||||
```java
|
||||
public int Fibonacci(int n) {
|
||||
|
||||
if (n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
@ -44,7 +43,6 @@ n<=39
|
||||
}
|
||||
|
||||
return Fibonacci(n - 2) + Fibonacci(n - 1);
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -124,7 +122,7 @@ f(n)=f(n-1)+f(n-2)+...+f(1)
|
||||
|
||||
1. “<<” : **左移运算符**,等同于乘2的n次方
|
||||
2. “>>”: **右移运算符**,等同于除2的n次方
|
||||
3. “>>>” **无符号右移运算符**,不管移动前最高位是0还是1,右移后左侧产生的空位部分都以0来填充。与>>类似。
|
||||
3. “>>>” : **无符号右移运算符**,不管移动前最高位是0还是1,右移后左侧产生的空位部分都以0来填充。与>>类似。
|
||||
例:
|
||||
int a = 16;
|
||||
int b = a << 2;//左移2,等同于16 * 2的2次方,也就是16 * 4
|
||||
@ -206,7 +204,6 @@ f(n)=f(n-1)+f(n-2)+...+f(1)
|
||||
//\ 转义字符. 如果你要使用 "\" 本身, 则应该使用 "\\". String类型中的空格用“\s”表示,所以我这里猜测"\\s"就是代表空格的意思
|
||||
return str.toString().replaceAll("\\s", "%20");
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 六 数值的整数次方
|
||||
@ -449,7 +446,6 @@ public ListNode ReverseList(ListNode head) {
|
||||
}
|
||||
return pre;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
@ -642,8 +638,6 @@ https://www.nowcoder.com/questionTerminal/d77d11405cc7470d82554cb392585106
|
||||
….
|
||||
依次执行,最后辅助栈为空。如果不为空说明弹出序列不是该栈的弹出顺序。
|
||||
|
||||
|
||||
|
||||
#### **考察内容:**
|
||||
|
||||
栈
|
||||
|
Loading…
x
Reference in New Issue
Block a user