mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-24 02:03:10 +08:00
Fix array queue.
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user