GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — leetcode/python/389_Find_the_Difference.py at master · qiyuangong/leetcode Expand file tree/ Copy path389_Find_the_Difference.pyMore file actions 19 lines (17 loc) · 436 Bytes / Copy path389_Find_the_Difference.pyFile metadata and controls19 lines (17 loc) · 436 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ res = ord(t[-1]) for i in range(len(s)): res += ord(t[i]) res -= ord(s[i]) return chr(res) # def findTheDifference(self, s, t): # res = 0 # for c in s + t: # res ^= ord(c) # return chr(res) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |