Company: Uber_14july
Difficulty: medium
Find the Winner! Problem Description Your task is to determine the winner of a card game played between Andrea and Maria. Game rules: Each player has a deck of numbered cards in a face-down pile. At the beginning, someone calls "Even" or "Odd". If "Even" is called, both players flip their top cards (at even indices). If "Odd" is called, both players discard their top cards, then flip the next cards (at odd indices). After flipping, Andrea subtracts Maria's card value from her own and adds the result to her score. Maria subtracts Andrea's card value from her own and adds the result to her score. For subsequent rounds, players alternately discard then flip cards based on the initial call. Once all cards are played, the player with the most points wins. For example, consider the following: Maria's cards (face down): maria = [3, 5, 6] Andrea's cards (face down): andrea = [4, 5, 7] Starting call: "Even" Here's how the game progresses: Round | Maria's Card | Andrea's Card | Andrea's Score |