mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-07 06:44:57 +08:00
Add a chapter of binary tree.
This commit is contained in:
@ -45,7 +45,7 @@ class ArrayQueue {
|
||||
|
||||
/* 出队 */
|
||||
public int poll() {
|
||||
// 删除头节点
|
||||
// 删除头结点
|
||||
if (isEmpty())
|
||||
throw new EmptyStackException();
|
||||
int num = nums[front];
|
||||
@ -56,7 +56,7 @@ class ArrayQueue {
|
||||
|
||||
/* 访问队首元素 */
|
||||
public int peek() {
|
||||
// 删除头节点
|
||||
// 删除头结点
|
||||
if (isEmpty())
|
||||
throw new EmptyStackException();
|
||||
return nums[front];
|
||||
|
Reference in New Issue
Block a user