This commit is contained in:
krahets
2023-08-04 05:24:49 +08:00
parent c4046ca688
commit fafdebb75c
27 changed files with 972 additions and 536 deletions

View File

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