{"action":"opened","issue":{"url":"https://api.github.com/repos/liuqun/leetcode-beginner-daily-homework/issues/4","repository_url":"https://api.github.com/repos/liuqun/leetcode-beginner-daily-homework","labels_url":"https://api.github.com/repos/liuqun/leetcode-beginner-daily-homework/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/liuqun/leetcode-beginner-daily-homework/issues/4/comments","events_url":"https://api.github.com/repos/liuqun/leetcode-beginner-daily-homework/issues/4/events","html_url":"https://github.com/liuqun/leetcode-beginner-daily-homework/issues/4","id":319448710,"number":4,"title":"125.验证回文串","user":{"login":"liuqun","id":64795,"avatar_url":"https://avatars0.githubusercontent.com/u/64795?v=4","gravatar_id":"","url":"https://api.github.com/users/liuqun","html_url":"https://github.com/liuqun","followers_url":"https://api.github.com/users/liuqun/followers","following_url":"https://api.github.com/users/liuqun/following{/other_user}","gists_url":"https://api.github.com/users/liuqun/gists{/gist_id}","starred_url":"https://api.github.com/users/liuqun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liuqun/subscriptions","organizations_url":"https://api.github.com/users/liuqun/orgs","repos_url":"https://api.github.com/users/liuqun/repos","events_url":"https://api.github.com/users/liuqun/events{/privacy}","received_events_url":"https://api.github.com/users/liuqun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-02T07:59:56Z","updated_at":"2018-05-02T07:59:56Z","closed_at":null,"author_association":"OWNER","body":"125. 验证回文串\r\n题目描述：\r\n给定一个字符串，验证它是否是回文串，只考虑字母和数字字符，可以忽略字母的大小写。\r\n\r\n说明：本题中，我们将空字符串定义为有效的回文串。\r\n\r\n示例 1：\r\n```\r\n输入: \"A man, a plan, a canal: Panama\"\r\n输出: true\r\n```\r\n示例 2：\r\n```\r\n输入: \"race a car\"\r\n输出: false\r\n```\r\n\r\n```\r\nclass Solution:\r\n    def isPalindrome(self, s):\r\n        \"\"\"\r\n        :type s: str\r\n        :rtype: bool\r\n        \"\"\"\r\n        buf = []\r\n        for ch in s:\r\n            if ch.isalnum():\r\n                buf.append(ch.lower())\r\n        n = len(buf)\r\n        for i in range(int(n / 2)):\r\n            if buf[i] != buf[n - 1 - i]:\r\n                return False\r\n        return True\r\n```"}}
{"actor":{"display_login":"liuqun"}}