Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8b3fb9 commit 114748bCopy full SHA for 114748b
src/data-structures/stack/Stack.js
@@ -16,7 +16,7 @@ export default class Stack {
16
* @return {*}
17
*/
18
peek() {
19
- if (!this.linkedList.tail) {
+ if (this.isEmpty()) {
20
return null;
21
}
22
0 commit comments