mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-11-10 11:09:43 +08:00
Compare commits
2 Commits
2a22a79733
...
d6465ba6b6
Author | SHA1 | Date | |
---|---|---|---|
|
d6465ba6b6 | ||
|
5d967733ce |
@ -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