Add a chapter of binary tree.

This commit is contained in:
krahets
2022-11-12 22:48:46 +08:00
parent ac8d0bcfeb
commit 7fdb4d1443
11 changed files with 150 additions and 10 deletions

View File

@ -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];