<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Mozk</author_name>
  <author_url>https://blog.hatena.ne.jp/Mozk/</author_url>
  <blog_title>壊れた計算機</blog_title>
  <blog_url>https://mozk-2.hatenadiary.org/</blog_url>
  <categories>
    <anon>CLRS</anon>
  </categories>
  <description>線形時間ソーティング。比較ソートがnlognかかることの証明と、その結果を利用した別のアルゴリズムの計算量の下界の証明。obliviousなsort。 Exercise 8.1-1 n-1 Exercise 8.2-4 def exercise_8_2_4(a,k) n = a.length c = Array.new(k+1) for i in 0..k c[i] = 0; end for i in 0...n c[a[i]] += 1 end for i in 1..k c[i] += c[i-1] end return lambda{|a,b| if a == 0 c[b] else c…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmozk-2.hatenadiary.org%2Fentry%2F20100206%2F1265460404&quot; title=&quot;アルゴリズムイントロダクション Chapter 8 - 壊れた計算機&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-02-06 21:46:44</published>
  <title>アルゴリズムイントロダクション Chapter 8</title>
  <type>rich</type>
  <url>https://mozk-2.hatenadiary.org/entry/20100206/1265460404</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
