Skip to content

Commit e5c25a8

Browse files
committed
fix: removed lesson12.ts from PR due to failing tests
1 parent 6ea2309 commit e5c25a8

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

lesson_12/structs_ts/src/lesson12.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,6 @@ export class Lesson12 {
66
* https://github.com/yang-su2000/Leetcode-algorithm-practice/tree/master/3062-winner-of-the-linked-list-game
77
*/
88
public gameResult(head: ListNode | null): string {
9-
let oddPoints: number = 0;
10-
let evenPoints: number = 0;
11-
12-
let curr = head;
13-
14-
while (curr != null && curr.next != null) {
15-
if (curr.val > curr.next.val) {
16-
evenPoints++;
17-
} else if (curr.val < curr.next.val) {
18-
oddPoints++;
19-
}
20-
curr = curr.next.next as ListNode;
21-
}
22-
23-
if (oddPoints > evenPoints) {
24-
return "Odd";
25-
} else if (oddPoints < evenPoints) {
26-
return "Even";
27-
} else {
28-
return "Tie";
29-
}
9+
return '';
3010
}
3111
}
32-

0 commit comments

Comments
 (0)