mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
Update the chapter of stack and queue.
This commit is contained in:
@@ -58,7 +58,6 @@ class ArrayQueue {
|
||||
|
||||
/* 访问队首元素 */
|
||||
public int peek() {
|
||||
// 删除头结点
|
||||
if (isEmpty())
|
||||
throw new EmptyStackException();
|
||||
return nums[front];
|
||||
|
||||
Reference in New Issue
Block a user