<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>daiiz</author_name>
  <author_url>https://blog.hatena.ne.jp/daiiz/</author_url>
  <blog_title>#daiizメモ</blog_title>
  <blog_url>https://daiiz.hatenablog.com/</blog_url>
  <categories>
    <anon>メモ</anon>
    <anon>tech</anon>
  </categories>
  <description>「深さ優先探索」と「幅優先探索」を初めて勉強したとき，これらの探索の動きを比較するためにMacのFinderを使ったディレクトリの探索で例えると分かりやすかった．当時やってたことをここに書いてみる． 例えば，以下のような木が与えられたとする． ここで「ノード「f」は存在するか？」という問いの設定で木を探索していくことを考える．この絵を見れば，木の全体を一気に見れるため，「存在する！」ということはほぼ一瞬で分かる．しかし，プログラムは木を一気には見れないため，ノードを1つずつ辿って見ていくことになる．深さ優先探索と幅優先探索とでは，辿る順番が異なる． 準備 上の木は，下のようなディレクトリ構造と…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdaiiz.hatenablog.com%2Fentry%2F2016%2F04%2F27%2F022340&quot; title=&quot;深さ優先探索と幅優先探索 - #daiizメモ&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>http://cdn-ak.f.st-hatena.com/images/fotolife/d/daiiz/20160427/20160427012631.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-04-27 02:23:40</published>
  <title>深さ優先探索と幅優先探索</title>
  <type>rich</type>
  <url>https://daiiz.hatenablog.com/entry/2016/04/27/022340</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
