@chanyuxi/utils 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/data-structure.d.ts
CHANGED
@@ -2,9 +2,10 @@ export interface ITreeNode<T> {
|
|
2
2
|
value: T;
|
3
3
|
}
|
4
4
|
|
5
|
-
export class BinaryTreeNode<T>
|
6
|
-
|
7
|
-
|
5
|
+
export class BinaryTreeNode<T> implements ITreeNode<T> {
|
6
|
+
value: T;
|
7
|
+
l: BinaryTreeNode<T> | null;
|
8
|
+
r: BinaryTreeNode<T> | null;
|
8
9
|
}
|
9
10
|
|
10
11
|
export class Queue<T> {
|
package/dist/data-structure.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
class
|
1
|
+
class Queue{constructor(){this.data=[]}peek(){var t;return null!==(t=this.data[0])&&void 0!==t?t:null}pop(){var t;return null!==(t=this.data.shift())&&void 0!==t?t:null}push(t){this.data.push(t)}size(){return this.data.length}}export{Queue};
|