Skip to content

Commit b0c63c4

Browse files
author
AmiyahJo
committed
feat: adds listnode
feat: adds comments refrence .java code
1 parent 07989fb commit b0c63c4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lesson_12/structs_ts/src/lesson12.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,22 @@ export class Lesson12 {
99
const oddPoints = 0;
1010
const evenPoints = 0;
1111

12+
class ListNode {
13+
costructor(current) {
14+
this.current = head;
15+
this. =
16+
}
17+
}
18+
// ListNode current = head;
1219

20+
// while(current != null && current.next != null) {
21+
// if (current.val > current.next.val) {
22+
// evenPoints++;
23+
// } else if (current.val < current.next.val) {
24+
// oddPoints++;
25+
// }
26+
// current = current.next.next;
27+
// }
1328

1429
if (oddPoints > evenPoints) {
1530
return "Odd";

0 commit comments

Comments
 (0)