<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>letitride</author_name>
  <author_url>https://blog.hatena.ne.jp/letitride/</author_url>
  <blog_title>追憶行</blog_title>
  <blog_url>https://www.letitride.jp/</blog_url>
  <categories>
    <anon>テック</anon>
    <anon>テック-その他</anon>
  </categories>
  <description>binary treeのノード削除 削除対象のノードの子が左右両方にある場合、削除後、親要素にどちらの要素をぶら下げれば良いか？ 10 5 15 2 6 17 1 3 というツリーがあった場合、ノード5を削除した場合、どういうツリーになるか？という話し。 答え:子左要素の最大値をもってくる 上記の例でいうと5の左子ノード2の最大値ノード3を移動する。 つまりこういう状態になる。 10 3 15 2 6 17 1 ノード削除のサンプルコード int delete_tree(int val){ tree_node *node, *parent_node; tree_node *left_bigge…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.letitride.jp%2Fentry%2F2020%2F02%2F09%2F083447&quot; title=&quot;2分木のノード削除 - 追憶行&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>2020-02-09 08:34:47</published>
  <title>2分木のノード削除</title>
  <type>rich</type>
  <url>https://www.letitride.jp/entry/2020/02/09/083447</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
