232.用栈实现队列,之前的js代码放到了go的代码块中

This commit is contained in:
posper
2021-08-01 11:16:22 +08:00
parent 268ed19e39
commit 5d1c088307

View File

@ -384,7 +384,7 @@ func (this *MyQueue) Peek() int {
func (this *MyQueue) Empty() bool { func (this *MyQueue) Empty() bool {
return len(this.stack) == 0 && len(this.back) == 0 return len(this.stack) == 0 && len(this.back) == 0
} }
```
javaScript: javaScript:
@ -442,8 +442,6 @@ MyQueue.prototype.empty = function() {
``` ```
----------------------- -----------------------
* 作者微信:[程序员Carl](https://mp.weixin.qq.com/s/b66DFkOp8OOxdZC_xLZxfw) * 作者微信:[程序员Carl](https://mp.weixin.qq.com/s/b66DFkOp8OOxdZC_xLZxfw)
* B站视频[代码随想录](https://space.bilibili.com/525438321) * B站视频[代码随想录](https://space.bilibili.com/525438321)