<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Bardiche_A</author_name>
  <author_url>https://blog.hatena.ne.jp/Bardiche_A/</author_url>
  <blog_title>猫気質な忘備録</blog_title>
  <blog_url>https://bardiche-a.hatenadiary.org/</blog_url>
  <categories>
    <anon>Class</anon>
  </categories>
  <description>課題で二分木を同レベル巡回しつつ、 各階層ごとのノードの要素を左から順に 出力するプログラムを作っていました。Google先生で調べてみたところ、 二分木の同レベル(同じ階層)巡回は 幅優先探索のだそうです。 そこまではわかったのですが、 なかなか実装例はなくて悩んでいました。 結局友人と相談した結果、 キュー(FIFO)を使って実装しましたとさ。具体的には、 一番上のルートをキューに格納。 ループを回して、キューから取り出す。 とりだした要素を出力する。 次の階層のノードを左からキューに投げる。 キューが空になるまでループ。 のような具合に実装しました。 一応題意を満たす動作は得られたのでこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbardiche-a.hatenadiary.org%2Fentry%2F20101127%2F1290865306&quot; title=&quot;アルゴリズム - 猫気質な忘備録&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>2010-11-27 22:41:46</published>
  <title>アルゴリズム</title>
  <type>rich</type>
  <url>https://bardiche-a.hatenadiary.org/entry/20101127/1290865306</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
