<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>pknight</author_name>
  <author_url>https://blog.hatena.ne.jp/pknight/</author_url>
  <blog_title>(void*)Pないと</blog_title>
  <blog_url>https://pknight.hatenablog.com/</blog_url>
  <categories>
    <anon>C</anon>
    <anon>algorithm</anon>
  </categories>
  <description>http://www.geocities.jp/ky_webid/algorithm/007.html 二分探索法は、あらかじめ配列を昇順あるいは降順にソートしておくことが前提になります。そして、まず配列の中央にある要素を調べます。もし目的の値と異なっていれば、目的の値とその位置にある値との大小関係を元に、配列の前半あるいは後半だけを調べるように、次の探索対象の範囲を設定します。 ソートとの合わせ技ですね。さっそく試してみます。因みにソートはシェルソートを用います。 #include &lt;stdio.h&gt; #define ARRAY_NUM(a) (sizeof(a)/sizeof(a[0]))…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpknight.hatenablog.com%2Fentry%2F20090704%2F1246697092&quot; title=&quot;二分探索法(バイナリサーチ) - (void*)Pないと&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>2009-07-04 17:44:52</published>
  <title>二分探索法(バイナリサーチ)</title>
  <type>rich</type>
  <url>https://pknight.hatenablog.com/entry/20090704/1246697092</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
