[Algorithms] 16. Implementing Stacks

Mikyung Lee·2021년 2월 12일
0
post-thumbnail

문제


해결방법


제출 코드


class Stack {
    constructor() {
        this.data = [];
    }
    push (record) {
        this.data.push(record);
    }
    
    pop() {
        return this.data.pop();
    }
    peek() {
        return this.data[this.data.length -1];
    }
}
profile
front-end developer 🌷

0개의 댓글

관련 채용 정보