{"published":"2023-05-23 10:49:15","description":"\u6982\u8981 \u4e00\u756a\u6700\u521d\u306e func twoSum(nums []int, target int) []int { for parentIdx, parentVal := range nums { for childIdx, childVal := range nums { if (childIdx == parentIdx){ continue } if (childVal + parentVal == target){ return []int{childIdx, parentIdx} } } } return nil } \u6539\u5584\u7b56 \u73fe\u72b6\u3001\u914d\u5217\u306e\u5404\u8981\u7d20\u306b\u3064\u3044\u3066\u3001\u4ed6\u306e\u3059\u3079\u3066\u306e\u8981\u7d20\u3068\u306e\u5408\u8a08\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3044\u2026","image_url":null,"type":"rich","blog_title":"yyzzz\u2019s diary","height":"190","url":"https://yyzzz.hatenadiary.com/entry/2023/05/23/104915","author_url":"https://blog.hatena.ne.jp/yyzzz/","provider_url":"https://hatena.blog","blog_url":"https://yyzzz.hatenadiary.com/","title":"\u3010LeetCode\u30111. Two Sum","provider_name":"Hatena Blog","author_name":"yyzzz","version":"1.0","categories":[],"width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyyzzz.hatenadiary.com%2Fentry%2F2023%2F05%2F23%2F104915\" title=\"\u3010LeetCode\u30111. Two Sum - yyzzz\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}