As reported: Uber L4 online assessment (2025), 4 questions in 90 minutes (1 easy, 2 medium, 1 hard); the easy one.
Given an integer array nums, return "EVEN" if the sum of the elements at even positions is greater than the sum at odd positions, "ODD" if the odd-position sum is greater, and "EQUAL" otherwise. Positions are 0-based (nums[0] is at an even position).
Example 1
nums = [5, 1, 2, 3]
Output: "EVEN" (5 + 2 = 7 vs 1 + 3 = 4)
Example 2
nums = [1, 2, 3, 4]
Output: "ODD"
Constraints: 1 ≤ nums.length ≤ 10^5; -10^9 ≤ nums[i] ≤ 10^9 — use 64-bit sums.
Code runner format: one JSON value per line: nums. Implement compareSums(nums); the harness prints the string.