This commit is contained in:
Melwin Amith D'Almeida 2024-07-17 10:38:34 +09:00 committed by GitHub
commit 2a22a79733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,6 +57,14 @@ export default class Stack {
.map((linkedListNode) => linkedListNode.value); .map((linkedListNode) => linkedListNode.value);
} }
/**
* @return {*}
*/
length() {
return this.linkedList
.toArray().length
}
/** /**
* @param {function} [callback] * @param {function} [callback]
* @return {string} * @return {string}