{"version":"1.0","provider_name":"Hatena Blog","type":"rich","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F03%2F13%2F173806\" title=\"Tree \u69cb\u9020\u3092\u5229\u7528\u3057\u305f\u30d2\u30fc\u30d7\uff08Ruby\uff09 - Camera Obscura\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","provider_url":"https://hatena.blog","description":"\u3053\u3053\u3067\u5b9f\u88c5\u3057\u305f Tree \u69cb\u9020\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002 require './tree' class Heap < Tree def self.build(ar) raise \"Argument is not Array.\" if ar.class != Array ar1 = ar.dup q = [] t = Heap.new(a = ar1.shift) q << a t.build1(q, ar1) t end def build1(q, ar) a = q.shift return if ar.empty? add(a, a1 = ar.shift) q << a1 return if ar.\u2026","height":"190","blog_title":"Camera Obscura","published":"2016-03-13 17:38:06","title":"Tree \u69cb\u9020\u3092\u5229\u7528\u3057\u305f\u30d2\u30fc\u30d7\uff08Ruby\uff09","author_url":"https://blog.hatena.ne.jp/obelisk2/","blog_url":"https://obelisk.hatenablog.com/","categories":["Ruby","\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0"],"url":"https://obelisk.hatenablog.com/entry/2016/03/13/173806","author_name":"obelisk2","image_url":null}