Skip to content

Commit 7ca9a49

Browse files
author
AmiyahJo
committed
vhore: remove .java implementation comments of stack.ts
1 parent 4f9e138 commit 7ca9a49

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

lesson_12/structs_ts/src/stack.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@ export class Stack {
88
}
99

1010
push(value: number): void {
11-
// ListNode newNode = new ListNode(value);
1211
const newNode = new ListNode(value)
13-
// newNode.next = top;
1412
newNode.next = this.top;
15-
// top = newNode;
1613
this.top = newNode;
1714
}
1815

1916
pop(): number | undefined {
20-
// if (this.isEmpty()) {
21-
// throw new EmptyStackException();
22-
// } else {
23-
// int value = top.val;
24-
// top = top.next;
25-
// return value;
26-
// }
2717
if (this.isEmpty()) {
2818
return undefined;
2919
}
@@ -34,10 +24,6 @@ export class Stack {
3424
}
3525

3626
peek(): number | null {
37-
// if (this.isEmpty()) {
38-
// throw new EmptyStackException();
39-
// }
40-
// return top.val;
4127
if (this.isEmpty()) {
4228
return undefined;
4329
}

0 commit comments

Comments
 (0)