You are given the head of a linked list of even length.
The list is partitioned into consecutive pairs of adjacent nodes: the node at index
In each pair, a game is played between the Even team and the Odd team:
If the value of the even indexed node is strictly greater than the value of the odd indexed node, the Even team scores
If the value of the odd indexed node is strictly greater than the value of the even indexed node, the Odd team scores
Return "Even" if the Even team has more points than the Odd team, "Odd" if the Odd team has more points than the Even team, or "Tie" if both teams have an equal number of points.
Constraints:
The number of nodes in the list is in the range
The number of nodes in the list is even.
Node.val
The value of each odd indexed node is odd.
The value of each even indexed node is even.
You are given the head of a linked list of even length.
The list is partitioned into consecutive pairs of adjacent nodes: the node at index
In each pair, a game is played between the Even team and the Odd team:
If the value of the even indexed node is strictly greater than the value of the odd indexed node, the Even team scores
If the value of the odd indexed node is strictly greater than the value of the even indexed node, the Odd team scores
Return "Even" if the Even team has more points than the Odd team, "Odd" if the Odd team has more points than the Even team, or "Tie" if both teams have an equal number of points.
Constraints:
The number of nodes in the list is in the range
The number of nodes in the list is even.
Node.val
The value of each odd indexed node is odd.
The value of each even indexed node is even.