389-Find-The-Difference

Sat 17 May 2025

https://leetcode.com/problems/find-the-difference

import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def findTheDifference(self, s: str, t: str) -> str:
    count = Counter(s)

    for i, c in enumerate(t):
      count[c] -= 1
      if count[c] == -1:
        return c
new Solution().findTheDifference()

Score: 5

Category: leetcode