{"version":"1.0","author_url":"https://blog.hatena.ne.jp/round-rand/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fml-rand-note.hatenablog.com%2Fentry%2Fruby%2Farray-max-min-max_by-min_by\" title=\"\u3010Ruby\u3011\u914d\u5217\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b(max, min, max_by, min_by) - \u30e9\u30f3\u30c9ML\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"provider_url":"https://hatena.blog","blog_url":"https://ml-rand-note.hatenablog.com/","title":"\u3010Ruby\u3011\u914d\u5217\u306e\u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b(max, min, max_by, min_by)","provider_name":"Hatena Blog","categories":["Ruby"],"description":"\u6700\u5927\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff1amax \u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff1amin \u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d6\u5f97\uff1aindex \u30fbfind_index \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u578b\u914d\u5217\u306e\u5834\u5408\uff1amax_by\u30fbmin_by \u30cf\u30c3\u30b7\u30e5\u306e\u5834\u5408 \u30af\u30e9\u30b9\u306e\u5834\u5408 \u53c2\u8003 \u6700\u5927\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff1amax \u914d\u5217\u306e\u6700\u5927\u5024\u306fmax\u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002 ary = [1, 4, 0, 3, 2] p ary.max #=> 4 \u6700\u5c0f\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\uff1amin \u914d\u5217\u306e\u6700\u5c0f\u5024\u306fmin\u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002 ary = [1, 4, 0, 3, 2] p ary.min #=> 0 \u6700\u5927\u5024\u30fb\u6700\u5c0f\u5024\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d6\u5f97\uff1aindex \u30fbfind_index \u6700\u2026","type":"rich","width":"100%","author_name":"round-rand","height":"190","published":"2026-07-29 00:00:00","url":"https://ml-rand-note.hatenablog.com/entry/ruby/array-max-min-max_by-min_by","blog_title":"\u30e9\u30f3\u30c9ML"}