822-Card-Flipping-Game

Sat 17 May 2025

https://leetcode.com/problems/card-flipping-game

import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def flipgame(self, fronts: List[int], backs: List[int]) -> int:
    same = {f for f, b in zip(fronts, backs) if f == b}
    return min([num for num in fronts + backs
                if num not in same] or [0])
new Solution().flipgame()

Score: 5

Category: leetcode