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
@ -57,6 +57,14 @@ export default class Stack {
|
||||
.map((linkedListNode) => linkedListNode.value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {*}
|
||||
*/
|
||||
length() {
|
||||
return this.linkedList
|
||||
.toArray().length
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {function} [callback]
|
||||
* @return {string}
|
||||
|
Loading…
Reference in New Issue
Block a user