LeetCode 389——找不同

1. 題目 2. 解答 2.1. 方法一 將 s 和 t 轉化爲 Python 的列表,然後遍歷列表 s 的元素,將它們從列表 t 中刪除,最後列表 t 中會餘下一個元素,即爲所求。 class Solution: def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """
相關文章
相關標籤/搜索