mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-02 02:02:57 +08:00
build
This commit is contained in:
@@ -1511,12 +1511,12 @@ comments: true
|
||||
|
||||
/* 判断队列是否为空 */
|
||||
empty() {
|
||||
return this.#queSize == 0;
|
||||
return this.#queSize === 0;
|
||||
}
|
||||
|
||||
/* 入队 */
|
||||
push(num) {
|
||||
if (this.size == this.capacity) {
|
||||
if (this.size === this.capacity) {
|
||||
console.log('队列已满');
|
||||
return;
|
||||
}
|
||||
@@ -1581,12 +1581,12 @@ comments: true
|
||||
|
||||
/* 判断队列是否为空 */
|
||||
empty(): boolean {
|
||||
return this.queSize == 0;
|
||||
return this.queSize === 0;
|
||||
}
|
||||
|
||||
/* 入队 */
|
||||
push(num: number): void {
|
||||
if (this.size == this.capacity) {
|
||||
if (this.size === this.capacity) {
|
||||
console.log('队列已满');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -564,7 +564,7 @@ comments: true
|
||||
|
||||
/* 判断栈是否为空 */
|
||||
isEmpty() {
|
||||
return this.size == 0;
|
||||
return this.size === 0;
|
||||
}
|
||||
|
||||
/* 入栈 */
|
||||
@@ -621,7 +621,7 @@ comments: true
|
||||
|
||||
/* 判断栈是否为空 */
|
||||
isEmpty(): boolean {
|
||||
return this.size == 0;
|
||||
return this.size === 0;
|
||||
}
|
||||
|
||||
/* 入栈 */
|
||||
|
||||
Reference in New Issue
Block a user