{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2F186.hatenablog.com%2Fentry%2F20071012%2F1192195267\" title=\" \u30aa\u30fc\u30c0\u30fc\u8a18\u6cd5\u306e\u554f\u984c - 186 @ hatenablog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","provider_url":"https://hatena.blog","version":"1.0","provider_name":"Hatena Blog","url":"https://186.hatenablog.com/entry/20071012/1192195267","categories":["study"],"image_url":null,"published":"2007-10-12 22:21:07","blog_title":"186 @ hatenablog","blog_url":"https://186.hatenablog.com/","height":"190","author_url":"https://blog.hatena.ne.jp/smoking186/","width":"100%","title":" \u30aa\u30fc\u30c0\u30fc\u8a18\u6cd5\u306e\u554f\u984c","author_name":"smoking186","description":"1+2+...+n = O(n) \u3068\u306a\u308b\u3053\u3068\u3092\u3044\u307e\u304b\u3089\u8a3c\u660e\u3057\u307e\u3059\u304c\uff0c\u3082\u3061\u308d\u3093\u3053\u308c\u306f\u9593\u9055\u3063\u3066\u3044\u307e\u3059\uff0e (\u771f\u5b9f\u306f 1+2+...+n = n(n+1)/2 \u306a\u306e\u3067\uff0e) \u3069\u3053\u304c\u307e\u3061\u304c\u3063\u3066\u3044\u308b\u3067\u3057\u3087\u3046\uff1f\u3068\u3044\u3046\u306e\u304c\u30af\u30a4\u30ba\u3067\u3059\uff0e \u8a3c\u660e n\u306b\u95a2\u3059\u308b\u6570\u5b66\u7684\u5e30\u7d0d\u6cd5\uff0e n=1\u306e\u3068\u304d\uff0c\u5de6\u8fba\u306f1\u3067\u53f3\u8fba\u306fO(1)\uff0e1=O(1)\u306a\u306e\u3067\u6210\u7acb\uff0e n>1\u306e\u3068\u304d\u3092\u8003\u3048\u308b\u3068\uff0c1+2+...+n=(1+2+...+(n-1))+n = O(n-1)+n = O(n)+n = O(n)\uff0e \u3053\u3053\u3067\uff0c\u300c1+2+...+(n-1)=O(n-1)\u300d\u3068\u3044\u3046\u5e30\u7d0d\u6cd5\u306e\u4eee\u5b9a\u3092\u7528\u3044\u305f\uff0e \u8a3c\u660e\u7d42 \u3053\u306e\u30af\u30a4\u30ba\u306f\u3044\u308d\u3044\u308d\u793a\u5506\u306b\u5bcc\u3093\u3067\u308b\u3068\u601d\u3046\u306e\u3067\u3059\uff0e\u8003\u3048\u3066\u307f\u3066\u2026"}