Simple one-liner Python beats 99.57%


  • 0
    X
    class Solution(object):
        def findTheDifference(self, s, t):
            """
            :type s: str
            :type t: str
            :rtype: str
            """
            return chr(sum(map(ord, t)) - sum(map(ord, s)))
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.