mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-09-20 07:43:04 +08:00
Merge 5d967733ce
into ca3d16dcce
This commit is contained in:
commit
2a22a79733
@ -56,6 +56,14 @@ export default class Stack {
|
|||||||
.toArray()
|
.toArray()
|
||||||
.map((linkedListNode) => linkedListNode.value);
|
.map((linkedListNode) => linkedListNode.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {*}
|
||||||
|
*/
|
||||||
|
length() {
|
||||||
|
return this.linkedList
|
||||||
|
.toArray().length
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {function} [callback]
|
* @param {function} [callback]
|
||||||
|
Loading…
Reference in New Issue
Block a user