Fix array queue.

This commit is contained in:
Yudong Jin
2023-02-01 03:23:29 +08:00
parent 658ad90377
commit 5eae708035
15 changed files with 425 additions and 365 deletions

View File

@ -4,11 +4,6 @@
* Author: IsChristina (christinaxia77@foxmail.com)
*/
function Trunk(prev, str) {
this.prev = prev;
this.str = str;
}
/**
* Print a linked list
* @param head
@ -22,6 +17,11 @@ function printLinkedList(head) {
console.log(list.join(" -> "));
}
function Trunk(prev, str) {
this.prev = prev;
this.str = str;
}
/**
* The interface of the tree printer
* This tree printer is borrowed from TECHIE DELIGHT
@ -83,6 +83,6 @@ function showTrunks(p) {
}
module.exports = {
printTree,
printLinkedList,
printTree
}