{"action":"opened","issue":{"url":"https://api.github.com/repos/yokostan/LeetcodeSolutions/issues/16","repository_url":"https://api.github.com/repos/yokostan/LeetcodeSolutions","labels_url":"https://api.github.com/repos/yokostan/LeetcodeSolutions/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/yokostan/LeetcodeSolutions/issues/16/comments","events_url":"https://api.github.com/repos/yokostan/LeetcodeSolutions/issues/16/events","html_url":"https://github.com/yokostan/LeetcodeSolutions/issues/16","id":359986900,"node_id":"MDU6SXNzdWUzNTk5ODY5MDA=","number":16,"title":"Leetcode #9 Palindrome Number","user":{"login":"yokostan","id":39684074,"node_id":"MDQ6VXNlcjM5Njg0MDc0","avatar_url":"https://avatars0.githubusercontent.com/u/39684074?v=4","gravatar_id":"","url":"https://api.github.com/users/yokostan","html_url":"https://github.com/yokostan","followers_url":"https://api.github.com/users/yokostan/followers","following_url":"https://api.github.com/users/yokostan/following{/other_user}","gists_url":"https://api.github.com/users/yokostan/gists{/gist_id}","starred_url":"https://api.github.com/users/yokostan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yokostan/subscriptions","organizations_url":"https://api.github.com/users/yokostan/orgs","repos_url":"https://api.github.com/users/yokostan/repos","events_url":"https://api.github.com/users/yokostan/events{/privacy}","received_events_url":"https://api.github.com/users/yokostan/received_events","type":"User","site_admin":false},"labels":[{"id":1050339124,"node_id":"MDU6TGFiZWwxMDUwMzM5MTI0","url":"https://api.github.com/repos/yokostan/LeetcodeSolutions/labels/Easy","name":"Easy","color":"88efd0","default":false},{"id":1050920642,"node_id":"MDU6TGFiZWwxMDUwOTIwNjQy","url":"https://api.github.com/repos/yokostan/LeetcodeSolutions/labels/Math","name":"Math","color":"3887c4","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-13T17:14:10Z","updated_at":"2018-09-13T17:14:10Z","closed_at":null,"author_association":"OWNER","body":"Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.\r\n\r\nExample 1:\r\n\r\nInput: 121\r\nOutput: true\r\nExample 2:\r\n\r\nInput: -121\r\nOutput: false\r\nExplanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.\r\nExample 3:\r\n\r\nInput: 10\r\nOutput: false\r\nExplanation: Reads 01 from right to left. Therefore it is not a palindrome.\r\n\r\n**Solutions:**\r\n`class Solution {\r\n    public boolean isPalindrome(int x) {\r\n        if (x < 0) \r\n            return false;\r\n        int copy = 0, pro = x;\r\n        while(x != 0)\r\n        {\r\n            copy = copy * 10 + x % 10;\r\n            x = x / 10;\r\n        }\r\n        return copy == pro;\r\n    }\r\n}`\r\n\r\nPoints:\r\n1. We have int and string methods for checking palindrome number. Int method uses math, while string number uses ==."}}
{"actor":{"display_login":"yokostan"}}