{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2016%2F01%2F26%2F011049\" title=\"2\u5206\u63a2\u7d22\uff08\u30d0\u30a4\u30ca\u30ea\u30b5\u30fc\u30c1\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>","image_url":"https://images-fe.ssl-images-amazon.com/images/I/51foeCpfmQL._SL160_.jpg","type":"rich","author_name":"obelisk2","provider_url":"https://hatena.blog","categories":["Ruby","\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0"],"author_url":"https://blog.hatena.ne.jp/obelisk2/","blog_title":"Camera Obscura","published":"2016-01-26 01:10:49","description":"\u7df4\u7fd2\u554f\u984c 2.3-5 \u6570\u5b57\u306e\u5165\u3063\u305f\u914d\u5217\u306e\u4e2d\u304b\u3089\u3001\u5f15\u6570\u306b\u4e00\u81f4\u3059\u308b\u8981\u7d20\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8fd4\u3057\u307e\u3059\u3002\u305d\u306e\u3088\u3046\u306a\u8981\u7d20\u304c\u306a\u3051\u308c\u3070 nil \u3092\u8fd4\u3057\u307e\u3059\u3002\u914d\u5217\u306f\u30bd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30de\u30fc\u30b8\u30bd\u30fc\u30c8\u306e\u3088\u3046\u306b\u3001\u914d\u5217\u3092\u518d\u5e30\u7684\u306b\u534a\u5206\u3065\u3064\u306b\u3057\u3066\u3044\u3063\u3066\u63a2\u3057\u307e\u3059\u3002\u6700\u60aa\u5b9f\u884c\u6642\u9593\u306f \u0398(lg n) \u3067\u3059\u3002Ruby \u3067\u3084\u308a\u307e\u3057\u305f\u3002 binary_search.rb\uff082017/6/30 \u4fee\u6b63\uff09 class Array def binary_search(n) ar = dup i = ar.size / 2 return nil if n < ar[0] or n > ar[-1] return i if ar[i] ==\u2026","version":"1.0","provider_name":"Hatena Blog","title":"2\u5206\u63a2\u7d22\uff08\u30d0\u30a4\u30ca\u30ea\u30b5\u30fc\u30c1\uff09","blog_url":"https://obelisk.hatenablog.com/","width":"100%","url":"https://obelisk.hatenablog.com/entry/2016/01/26/011049","height":"190"}