<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>obelisk2</author_name>
  <author_url>https://blog.hatena.ne.jp/obelisk2/</author_url>
  <blog_title>Camera Obscura</blog_title>
  <blog_url>https://obelisk.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>アルゴリズム</anon>
  </categories>
  <description>勉強のために Ruby で二分探索木を書いてみました。 二分探索木の Ruby 実装 · GitHub なお、以下のコードは説明のためなので、Gist のコードを多少簡略化しています。 木（Tree）のクラスと要素（Node）のクラスを定義します。Node は Struct クラスを使って簡単に定義します。key と value の値が使えます。Node を追加するたび、key の順序で整序します。 Node = Struct.new(:key, :value, :left, :right) Tree クラスは、要素の追加と探索はこんな風になります。 class Tree def initia…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fobelisk.hatenablog.com%2Fentry%2F2019%2F01%2F05%2F175027&quot; title=&quot;Ruby で二分探索木 - Camera Obscura&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-01-05 17:50:27</published>
  <title>Ruby で二分探索木</title>
  <type>rich</type>
  <url>https://obelisk.hatenablog.com/entry/2019/01/05/175027</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
