{"version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakayasugiyama.com%2Fentry%2F2022%2F03%2F08%2F202328\" title=\"LeetCode Longest Common Prefix\u3092\u89e3\u3044\u3066\u307f\u305f - \u4f55\u304b\u3084\u3063\u3066\u307f\u308b\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/s-takaya1027/","width":"100%","description":"\u554f\u984c https://leetcode.com/problems/longest-common-prefix/ \u89e3\u3044\u305f # @param {String[]} strs # @return {String} def longest_common_prefix(strs) data = strs[0] result = \"\" data.chars.each_with_index do |char, index| if strs.all? { |str| str[index] == char} result += char else break end end result end \u7d50\u679c","title":"LeetCode Longest Common Prefix\u3092\u89e3\u3044\u3066\u307f\u305f","blog_title":"\u4f55\u304b\u3084\u3063\u3066\u307f\u308b\u30d6\u30ed\u30b0","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/s/s-takaya1027/20220308/20220308202313.png","author_name":"s-takaya1027","categories":[],"provider_name":"Hatena Blog","height":"190","type":"rich","published":"2022-03-08 20:23:28","provider_url":"https://hatena.blog","url":"https://takayasugiyama.com/entry/2022/03/08/202328","blog_url":"https://takayasugiyama.com/"}