{"action":"created","issue":{"url":"https://api.github.com/repos/crossoverJie/JCSprout/issues/107","repository_url":"https://api.github.com/repos/crossoverJie/JCSprout","labels_url":"https://api.github.com/repos/crossoverJie/JCSprout/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/crossoverJie/JCSprout/issues/107/comments","events_url":"https://api.github.com/repos/crossoverJie/JCSprout/issues/107/events","html_url":"https://github.com/crossoverJie/JCSprout/issues/107","id":369793254,"node_id":"MDU6SXNzdWUzNjk3OTMyNTQ=","number":107,"title":"某大厂面试题","user":{"login":"crossoverJie","id":15684156,"node_id":"MDQ6VXNlcjE1Njg0MTU2","avatar_url":"https://avatars3.githubusercontent.com/u/15684156?v=4","gravatar_id":"","url":"https://api.github.com/users/crossoverJie","html_url":"https://github.com/crossoverJie","followers_url":"https://api.github.com/users/crossoverJie/followers","following_url":"https://api.github.com/users/crossoverJie/following{/other_user}","gists_url":"https://api.github.com/users/crossoverJie/gists{/gist_id}","starred_url":"https://api.github.com/users/crossoverJie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossoverJie/subscriptions","organizations_url":"https://api.github.com/users/crossoverJie/orgs","repos_url":"https://api.github.com/users/crossoverJie/repos","events_url":"https://api.github.com/users/crossoverJie/events{/privacy}","received_events_url":"https://api.github.com/users/crossoverJie/received_events","type":"User","site_admin":false},"labels":[{"id":1089701440,"node_id":"MDU6TGFiZWwxMDg5NzAxNDQw","url":"https://api.github.com/repos/crossoverJie/JCSprout/labels/Interview%20question","name":"Interview question","color":"b8f6f9","default":false}],"state":"open","locked":false,"assignee":{"login":"crossoverJie","id":15684156,"node_id":"MDQ6VXNlcjE1Njg0MTU2","avatar_url":"https://avatars3.githubusercontent.com/u/15684156?v=4","gravatar_id":"","url":"https://api.github.com/users/crossoverJie","html_url":"https://github.com/crossoverJie","followers_url":"https://api.github.com/users/crossoverJie/followers","following_url":"https://api.github.com/users/crossoverJie/following{/other_user}","gists_url":"https://api.github.com/users/crossoverJie/gists{/gist_id}","starred_url":"https://api.github.com/users/crossoverJie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossoverJie/subscriptions","organizations_url":"https://api.github.com/users/crossoverJie/orgs","repos_url":"https://api.github.com/users/crossoverJie/repos","events_url":"https://api.github.com/users/crossoverJie/events{/privacy}","received_events_url":"https://api.github.com/users/crossoverJie/received_events","type":"User","site_admin":false},"assignees":[{"login":"crossoverJie","id":15684156,"node_id":"MDQ6VXNlcjE1Njg0MTU2","avatar_url":"https://avatars3.githubusercontent.com/u/15684156?v=4","gravatar_id":"","url":"https://api.github.com/users/crossoverJie","html_url":"https://github.com/crossoverJie","followers_url":"https://api.github.com/users/crossoverJie/followers","following_url":"https://api.github.com/users/crossoverJie/following{/other_user}","gists_url":"https://api.github.com/users/crossoverJie/gists{/gist_id}","starred_url":"https://api.github.com/users/crossoverJie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossoverJie/subscriptions","organizations_url":"https://api.github.com/users/crossoverJie/orgs","repos_url":"https://api.github.com/users/crossoverJie/repos","events_url":"https://api.github.com/users/crossoverJie/events{/privacy}","received_events_url":"https://api.github.com/users/crossoverJie/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-10-13T11:24:04Z","updated_at":"2018-10-13T12:09:29Z","closed_at":null,"author_association":"OWNER","body":"题目：\r\n\r\n 一个`“.”`代表一个任意字母。\r\n\r\n 注意事项：可以假设所有的单词只包含小写字母`“a-z”`\r\n\r\n 样例：\r\n\r\n```java\r\n addWord(“bad”);\r\n addWord(“dad”);\r\n addWord(“mad”);\r\n search(“pad”);  // return false;\r\n search(“bad”);  // return true;\r\n search(“.ad”); // return true;\r\n search(“b..”); // return true;\r\n```\r\n\r\n 如果有并发的情况下，`addWord()` 怎么处理？"},"comment":{"url":"https://api.github.com/repos/crossoverJie/JCSprout/issues/comments/429536797","html_url":"https://github.com/crossoverJie/JCSprout/issues/107#issuecomment-429536797","issue_url":"https://api.github.com/repos/crossoverJie/JCSprout/issues/107","id":429536797,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTUzNjc5Nw==","user":{"login":"CyC2018","id":36260787,"node_id":"MDQ6VXNlcjM2MjYwNzg3","avatar_url":"https://avatars3.githubusercontent.com/u/36260787?v=4","gravatar_id":"","url":"https://api.github.com/users/CyC2018","html_url":"https://github.com/CyC2018","followers_url":"https://api.github.com/users/CyC2018/followers","following_url":"https://api.github.com/users/CyC2018/following{/other_user}","gists_url":"https://api.github.com/users/CyC2018/gists{/gist_id}","starred_url":"https://api.github.com/users/CyC2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyC2018/subscriptions","organizations_url":"https://api.github.com/users/CyC2018/orgs","repos_url":"https://api.github.com/users/CyC2018/repos","events_url":"https://api.github.com/users/CyC2018/events{/privacy}","received_events_url":"https://api.github.com/users/CyC2018/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T12:09:29Z","updated_at":"2018-10-13T12:09:29Z","author_association":"CONTRIBUTOR","body":"并发度为 26 的方案\r\n\r\n```java\r\n    private class Trie {\r\n\r\n        private class Node {\r\n            Node[] childs = new Node[26];\r\n            boolean isLeaf;\r\n        }\r\n\r\n        Trie() {\r\n            for (int i = 0; i < 26; i++) {\r\n                root.childs[i] = new Node();\r\n            }\r\n        }\r\n\r\n        private Node root = new Node();\r\n\r\n        void insert(String word) {\r\n            if (word.length() == 0) return;\r\n            int index = indexForChar(word.charAt(0));\r\n            // 支持并发度为 26\r\n            synchronized (root.childs[index]) {\r\n                insert(word, root);\r\n            }\r\n        }\r\n      // ...\r\n}\r\n```"}}
{"actor":{"display_login":"CyC2018"}}