[Hacker Earth] Panda and XORRead more
[LeetCode] Winner of the Linked List Game

3062. Winner of the Linked List Game

You are given the head of a linked list of even length containing integers.

Each odd-indexed node contains an odd integer and each even-indexed node contains an even integer.

We call each even-indexed node and its next node a pair, e.g., the nodes with indices 0 and 1 are a pair, the nodes with indices 2 and 3 are a pair, and so on.

For every pair, we compare the values of the nodes in the pair:

  • If the odd-indexed node is higher, the "Odd" team gets a point.
  • If the even-indexed node is higher, the "Even" team gets a point.

Return the name of the team with the higher points, if the points are equal, return "Tie".

Read more
[Hacker Earth] DoghousesRead more
[Hacker Earth] Scheduling WarRead more
[Hacker Earth] Roy and TilesRead more
[Hacker Earth] Matrix DisputeRead more
[Hacker Earth] XOR in TreeRead more
[Codeforces] Round 498 (Div. 3) F. Xor-PathsRead more
[Codeforces] Round 504 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) E. Down or RightRead more
[Codeforces] Round 505 (rated, Div. 1 + Div. 2, based on VK Cup 2018 Final) D. Recovering BSTRead more