<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>takeda25</author_name>
  <author_url>https://blog.hatena.ne.jp/takeda25/</author_url>
  <blog_title>アスペ日記</blog_title>
  <blog_url>https://takeda25.hatenablog.jp/</blog_url>
  <categories>
  </categories>
  <description>「区間[0,M)なるN個の一様乱数を昇順に配列に格納したい．M は十分に大きい．領域計算量O(N)，時間計算量O(N)でこれを行う方法を考えよ．」という問題について、バケットソートを使って Python で書いてみた。比較回数（適当だから間違ってるかも）は、1000個でやるとだいたい600〜700回になる。バケットのソートには、Wikipediaの挿入ソートを使った。 import random, math M = 2 ** 32 N = 1000 def insertion_sort(target_list): steps = 0 for i in range(1, len(target_l…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakeda25.hatenablog.jp%2Fentry%2F20100627%2F1277629883&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-06-27 18:11:23</published>
  <title>一様乱数のソート</title>
  <type>rich</type>
  <url>https://takeda25.hatenablog.jp/entry/20100627/1277629883</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
