{"provider_url":"https://hatena.blog","author_name":"peroon","blog_title":"perogram","description":"\u59cb\u70b9\u304b\u3089\u3046\u3055\u304e(fast)\u3068\u4e80(slow)\u3092\u8d70\u3089\u305b\u308b fast += 2; slow += 1; \u51fa\u767a\u304b\u3089m\u79d2\u5f8c\u306b\u51fa\u4f1a\u3063\u305f\u3068\u3059\u308b \u30eb\u30fc\u30d7\u304c\u3042\u308b\u3068\u304d\u306f\u4e0a\u8a18\u306e\u72b6\u614b\u306b\u306a\u3063\u3066\u3044\u308b \u30eb\u30fc\u30d7\u306e\u59cb\u70b9\u3092O\u3068\u3059\u308b \u30eb\u30fc\u30d7\u306e\u4e00\u5468\u306e\u9577\u3055\uff1a\u03bc \u30eb\u30fc\u30d7\u306b\u5165\u308b\u307e\u3067\u306e\u9053\u306e\u9577\u3055\uff1a\u03bb O\u304b\u3089d\u9032\u3093\u3060\u3068\u3053\u308d\u3067\u3046\u3055\u304e\u3068\u4e80\u304c\u51fa\u4f1a\u3063\u305f\u3068\u3059\u308b \u3053\u306e\u6642\u307e\u3060O\u3082d\u3082\u4e0d\u660e 0<= d <= \u03bc-1 \u51fa\u4f1a\u3063\u305f\u4f4d\u7f6e\u304b\u3089\u03bb\u3060\u3051\u79fb\u52d5\u3059\u308b\u3068\u3001d+\u03bb = m = a\u03bc \u306a\u306e\u3067\uff08\uff01\uff1f\uff09O\u306b(\u4f55\u9031\u304b\u3059\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u304c)\u5230\u9054\u3059\u308b \u2235 d = m - \u03bb \u305d\u3053\u304b\u3089\u03bb\u9032\u3080\u3068m\u306a\u306e\u3067\u3001O\u304b\u3089m\u9032\u3093\u3060\u3053\u3068\u306b\u306a\u308b m = a\u03bc\u306a\u306e\u3067\u3001O\u306b\u5230\u7740\u3059\u308b \u3053\u308c\u3089\u306e\u8003\u5bdf\u3092\u7528\u3044\u308b\u3068\u2026","author_url":"https://blog.hatena.ne.jp/peroon/","blog_url":"https://perogram.hateblo.jp/","published":"2019-04-13 02:18:00","title":"\u30d5\u30ed\u30a4\u30c9\u306e\u5faa\u74b0\u691c\u51fa\u6cd5 Floyd's cycle-finding algorithm","provider_name":"Hatena Blog","height":"190","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/p/peroon/20190413/20190413020858.jpg","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fperogram.hateblo.jp%2Fentry%2Fcycle_detection\" title=\"\u30d5\u30ed\u30a4\u30c9\u306e\u5faa\u74b0\u691c\u51fa\u6cd5 Floyd&#39;s cycle-finding algorithm - perogram\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","type":"rich","categories":[],"url":"https://perogram.hateblo.jp/entry/cycle_detection"}