mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2025-07-06 01:15:56 +08:00
Merge branch 'master' into improve-bubble-sort
This commit is contained in:
@ -16,7 +16,7 @@ export default class Stack {
|
||||
* @return {*}
|
||||
*/
|
||||
peek() {
|
||||
if (!this.linkedList.tail) {
|
||||
if (this.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user