Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 56b42ae

Browse files
Merge branch 'master' into improve-bubble-sort
2 parents 304afc8 + 114748b commit 56b42ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/data-structures/stack/Stack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default class Stack {
1616
* @return {*}
1717
*/
1818
peek() {
19-
if (!this.linkedList.tail) {
19+
if (this.isEmpty()) {
2020
return null;
2121
}
2222

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /