mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-10 14:36:06 +00:00
Fix array queue.
This commit is contained in:
@@ -7,16 +7,6 @@
|
||||
import ListNode from './ListNode';
|
||||
import { TreeNode } from './TreeNode';
|
||||
|
||||
class Trunk {
|
||||
prev: Trunk | null;
|
||||
str: string;
|
||||
|
||||
constructor(prev: Trunk | null, str: string) {
|
||||
this.prev = prev;
|
||||
this.str = str;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a linked list
|
||||
* @param head
|
||||
@@ -30,6 +20,16 @@ function printLinkedList(head: ListNode | null): void {
|
||||
console.log(list.join(' -> '));
|
||||
}
|
||||
|
||||
class Trunk {
|
||||
prev: Trunk | null;
|
||||
str: string;
|
||||
|
||||
constructor(prev: Trunk | null, str: string) {
|
||||
this.prev = prev;
|
||||
this.str = str;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The interface of the tree printer
|
||||
* This tree printer is borrowed from TECHIE DELIGHT
|
||||
|
||||
Reference in New Issue
Block a user