We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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